Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shortcut/macro to increase/decrease # decimal plac (Excel XP)

    Is there a shortcut key or easy way using macros to increase/decrease the number of decimal places? I've searched Microsoft's list of shortcuts and played with macros with no success.

    Thanks!

    Larry

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Shortcut/macro to increase/decrease # decimal

    Hi Larry

    Have you tried using the options on the formatting toolbar?

  3. #3
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    Tony,

    Thanks - that's the method I usually use. I am teaching an Excel class and was asked this question by a student who is prefers short cut keys whenever possible, but couldn't find/create a solution.

    Larry

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    Macros with these instructions:

    CommandBars("Formatting").FindControl(ID:=398).Exe cute

    for increasing number of decimal places, and

    CommandBars("Formatting").FindControl(ID:=399).Exe cute

    for decreasing the number of decimal places, will probably work on a system that uses a decimal point. It will fail on systems using something else, such as a comma, as decimal separator.

    You could assign keyboard shortcuts to those macros.

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    There's a list of shortcuts in <!post=Star Post,68646>Star Post<!/post>. You'd probably need to write a macro and bind it to a Ctrl-Shift-Alpha Key combination.
    -John ... I float in liquid gardens
    UTC -7ąDS

  6. #6
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    Hans,

    As usual, you are the man!!!! Thank you very much. Is there a good reference that you can refer me to re "Find Control" with a complete list of all the codes (398, 399...) so I apply these technique to other applications?

    Thanks again!

    Larry

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    I simply used
    ? CommandBars("Formatting").Controls("Increase Decimal").ID
    and
    ? CommandBars("Formatting").Controls("Decrease Decimal").ID
    in the Immediate window. You could use CommandBars("Formatting").Controls("Increase Decimal") too, instead of the expression with the ID's, but then the code would only work on an English language system.

    See for example <post#=71782>post 71782</post#> for a macro to list all IDs.

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    You can find all of them (for all Office applications) in my xlmenufundict
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  9. #9
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    You can also find an updated (for Excel 2003) list of keyboard shortcuts at this MS web site:

    Office Online - Excel shortcut and function keys

    Note: click "Show All" link at top of page to display full list, which can be printed. I copied these into a spreadsheet, see attached file (XL 2K format). The format is somewhat different than the other list which was based on Help file. Note - some of these may only apply to XL 2003/2003 (ie, Task Pane shortcuts). Still apparently no keyboard shortcut for increasing/decreasing the decimal places. As noted on web site, "If an action you use often does not have a shortcut key, you can record a macro to create one."

    HTH

  10. #10
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut/macro to increase/decrease # decimal

    Jan Karel,

    Thank you - the list is exactly what I am looking for!!!!

    Larry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •