Create Shortcut for Increasing or Decreasing Decimals in Excel

Hi,

Microsoft Excel Mac doesn't have a shortcut for increasing or decreasing decimals.
Can this be done with Keyboard Maestro or maybe Applescript?

Any help would be much appreciated

Hey Chris,

Please be more specific.

-Chris

Is there a menu item for it? If so, KM can "click" the menu item.

Inreasing and decreasing decimals are in the Ribbon Menu on the Mac.

You can add some keyboard shortcuts to to the ribbon.
Via the Tools menu > Customize Keyboard.

However that's not very user friendly to setup.
And the keys to use are very limited (you can't use cmd+shift+key) for example.

That's why I was wondering if someone here has found out how to acces these "hidden" shortcuts via Keyboard Meastro.

That would be awesome.

Hope this helps

Hey Chris,

Keyboard Maestro can't access Excel's internal commands, but if you can write an Excel macro to do the job you can run that with AppleScript. (At least in Office 2016 – I can't speak for Office 365.)

tell application "Microsoft Excel"
   run VB macro "TEST_MACRO_01_Increment_Decimal"
end tell

Here's a VB macro to get you started:

Sub IncreaseDecimal()

    Dim myFormat As String
    myFormat = Selection.NumberFormat
    If (Len(myFormat) > 1) And (Mid(myFormat, 2, 1) = ".") Then
        myFormat = myFormat & "0"
    Else
        myFormat = "0.0"
    End If
    Selection.NumberFormat = myFormat

End Sub

-Chris