Change default number format

gyme623

New Member
Joined
Jun 6, 2008
Messages
14
Hello,

I don't know if this is do-able (short of just writing a simple macro), but is it possible to change the default number formatting to 0 decimal places? I work with big #s, and I don't like using the mouse, so it would be really helpful if CTRL+SHIFT+1 would get me no decimals w/ commas.

Thanks.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,541
You can select the entire sheet (by clicking in the area above line1 at the left of col A) and format the whole sheet with the preferred number of decimals.
Or you record a series of macro while you:
-select a cell
-format as preferred

Then:
-open the vba editor with Alt-F11
-locate the code of your macros
-cancel the instruction Range("A1").Select, so that the code will work on the Activecell
-return to excel and assign a shortcut to each of these macro (but it has to ve a letter...): Menu /Macro /Macro; select a macro, Options, assign the shortcut; repeat; close by clicking the X.

Then you will activate each of the macro with the shortcut, for example Contr-shift-a for 1 decimal, or Contr-shift-b for 2 decimals.

Bye.
 

gyme623

New Member
Joined
Jun 6, 2008
Messages
14
Maybe I wasn't clear in my question. I am fully aware that I could write a macro to allow me to use a shortcut to format this way. What I want to know is can I change the code on the software to hardwire the default number format that I want right into excel. I could easily write a macro to do this, but then I would have to put it on every workbook that I wanted to use, which wouldn't be worth the effort.
 

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,541
Putting the macro in your "Personal.xls", so that they are available to all of the files?

Bye.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,771
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Open a new blank workbook. Modify the Normal style to include the numberformat you want. Save the workbook as a template called Book.xlt in your XLSTART directory. Now if you start a new workbook via Ctrl+N or File->New, it will have your default number format. (if you use File-New... New blank workbook, it will not use the template for some reason).
HTH
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,468
Messages
5,831,809
Members
430,087
Latest member
meagerd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top