Link to home
Start Free TrialLog in
Avatar of Jenedge73
Jenedge73Flag for Afghanistan

asked on

setting default number Format Excel 2010

Is there any way to set the number  format in the ribbon of excel 2010 to a custom format?
Avatar of Magadu
Magadu
Flag of Canada image

One way you can do, is by creating a macro that applies formatting you need and adding it to the Ribbon, but i have feeling there should be an easier way that does not require VBA.

you will have to use something like:

Sub sbSetCustomFormat()
 Selection.NumberFormat = "_($* #,##0_);_($* (#,##0);_($* ""-""_);_(@_)"
End Sub
Avatar of Rory Archibald
You can create a custom group on a ribbon tab and assign a macro button to it, or you can alter the relevant style of a blank workbook to use the formatting you want, then save it as a template called book.xltx in your XLSTART folder. Note that this template will be used if you use Ctrl+N or the New workbook button to create a new workbook, but not if you use File-New-Blank workbook.
Avatar of Jenedge73

ASKER

Thanks.  I added the macro to a ribbon.  Too bad you can’t customise the comma in the home tab.  
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial