Please help me understand custom spacing in custom formats

pcvchriskmg

Board Regular
Joined
Feb 10, 2010
Messages
118
Hi,

I am having difficulty understanding spacing in custom formats.

I need to make the 9-digit number 333777097 appear as: 33 37 770 97.

The intuitive solution would seem to be:
##_##_###_##

However that gives: 33377 7 09 7

This does not work.

Through trial and error, I determined that the following works:
#_###_####_###

Obviously I am misunderstanding something at the core of how the spacing works or is calculated.

Could someone please briefly explain to me why the first format fails to work but the second does.

I want to avoid the trial and error process next time!

Thank you in advance,
Chris
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
In a number format, the underscore is a special character meaning leave space for the character that follows. Try ##-##-###-## instead. If you particularly want underscores you can use ##\_##\_###\_##.
 
Upvote 0
Or just leave spaces ## ## ### ##

This is actually what I initially tried. It yields:

333 777 097

Then after a search on Google, I learned about using underscores.

Using the hyphen '-' actually places the '-' into the number itself.

33-37-770-97
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,921
Latest member
BBQKING

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
Back
Top