Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

The NumberFormatConvert Macro

After getting the number format of the active cell (or top left cell of a range selection), the macro examines each character of the format. If characters corresponding to percent, currency, date or time formats are found, nothing is done. If an E is found, the range is formatted General . If none of these characters is found, the number format is changed to the default Scientific format, O.OOE+00. [Pg.323]

If TypeName(ActiveSheet) Worksheet Then Beep Exit Sub If not worksheet, exit. [Pg.323]

If c = E Then Selection.NumberFormat = General Exit Sub Next [Pg.323]

Writing a macro that performs Floating Point/Scientific number formatting and returns a number with the same number of significant figures as in the original number is much more difficult. You may wish to try to write one. [Pg.324]


Some of your macros will be written for a very specific purpose, such as to prepare a specialized report. The workbook containing the macro will be opened only when you want to assemble the report. Other macros automate tasks that you perform often, and you ll want to have them available whenever you re using Excel. These macros should be saved in the Personal Macro Workbook. To make a command macro even easier to use, you can add a custom toolbutton to a toolbar and assign the macro to it. The three macros described in this section — the NumberFormatConvert macro, the FullPage macro and the ChemicalFormat macro — are particularly convenient to use when they are assigned to a button. [Pg.321]


See other pages where The NumberFormatConvert Macro is mentioned: [Pg.322]    [Pg.323]    [Pg.323]    [Pg.322]    [Pg.323]    [Pg.323]   


SEARCH



© 2024 chempedia.info