Page 122 - Excel Timesaving Techniques for Dummies
P. 122

23_574272 ch20.qxd  10/1/04  10:43 PM  Page 107
                                                                                                               107
                                                         Assigning Custom Number Formats to Styles and Toolbars
                      Assigning Custom Number                                  of the current workbook. To use these styles
                                                                               and their custom number formats in other
                      Formats to Styles and Toolbars                           workbooks you build, you have to merge the
                                                                               styles into them. (See Technique 18 for more
                                                                               on merging styles.)
                      Frankly, the only problem with custom number for-
                      mats is that they’re just not that easy to use. To
                      apply them to a cell selection, you have to open the
                      Number tab of the Format Cells (Ctrl+1) dialog box,
                      select Custom in the Category list box, and then find
                      the darned number format codes in the Type list box
                      containing that long listing of codes.
                      To make your custom number formats much more
                      accessible, I suggest that, at the very least, you assign
                      the custom number formats to styles that you can
                      then select from the Style dialog box (or Style drop-
                      down list if you follow my advice and add this little
                      gem to the Formatting toolbar or one of your own  • Figure 20-3: Assigning a custom number format to a new
                      design — refer to Figure 18-3 in Technique 18).              style.

                      To hitch one of your custom number formats to a
                      new style, follow these steps:                    If you start using a custom number format on a fre-
                                                                        quent basis, you may want to do more than just
                                                                        assign the format to a style that you can apply from
                        1.  Apply the custom number format you want
                           to assign to a style to a sample entry in your  the Style dialog box or drop-down list box that you
                                                                        add to a toolbar. You can add the style to a button
                           worksheet.
                                                                        that you add to the Formatting toolbar or a toolbar
                           To do this, select the cell, open the Number tab  of your own design.
                           of the Format Cells dialog box (Ctrl+1), select
                           Custom in the Category list box, select the for-  To add a style that applies a number format to a but-
                           mat’s codes in the Type list box, and click OK.  ton, follow these three steps:
                       2.  Choose Format➪Style to open the Style
                           dialog box.                                   1.  Assign the custom number format to a custom
                                                                             style (as described in the preceding steps).
                       3.  Enter the new name for your style in the Style
                           Name text box.                                2.  Record a keystroke macro (see Technique 60)
                                                                             that selects that style.
                           When you type the new style name, the Style dia-
                           log box displays the number codes for the cus-  3.  Assign the keystroke macro to a custom button
                                                                             on one of your toolbars. (See Technique 2.)
                           tom number format in the Style Includes (By
                           Example) area, as shown in Figure 20-3.
                                                                        To see how easy this is, follow along with the steps
                       4.  Click OK to close the Style dialog box.      for assigning a custom number format — one that
                                                                        hides all types of entries in a cell — to a new button
                             Be sure to save your worksheet after assigning
                             your custom number formats to new styles.  on my Custom Formats toolbar (a toolbar of my own
                             Keep in mind that styles are saved only as part  design):
   117   118   119   120   121   122   123   124   125   126   127