How to define specific format for number? [Solved/Closed]

Posts
48
Registration date
Saturday October 27, 2012
Last seen
March 4, 2014
- - Latest reply: ugn10
Posts
48
Registration date
Saturday October 27, 2012
Last seen
March 4, 2014
- Mar 4, 2014 at 10:07 AM
Hi,
I would like to define specific format in excel.

For example, if I type 123456789 and hit Enter, it should be 123-456-789 or 123-45-6789 automatically or any other format like...if I type 22543345, it should be 0124-22543345 after hitting Enter automatically.

Regards
GN Jha
See more 

2 replies

Best answer
Posts
1834
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
May 30, 2018
1
Thank you
ugn10, Good evening.

Try to do like this:

Select the cell you want to format
--> Menu Format
--> Number
--> Personalized
--> ###-##-####

Please, tell us if it worked for you.
I hope it helps.

Say "Thank you" 1

A few words of thanks would be greatly appreciated. Add comment

CCM has helped 2732 users this month

ac3mark
Posts
10930
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 11, 2018
-
Right on, I forgot about the menu option! Thank you so much, as I am always in favor of using built-in functions. Thanks again!

//ark
ugn10
Posts
48
Registration date
Saturday October 27, 2012
Last seen
March 4, 2014
-
Nice...Thanks...it worked but
In my queries there are two things...I got solution for one.
How to fix..following...
I want to define cell format as following...
If I put value 22554444, after hitting Enter it must be 011-22554444.
Posts
10930
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 11, 2018
0
Thank you
OK, Text will do what you want as in =text(a1,"#-#-###")

Take a look:

ugn10
Posts
48
Registration date
Saturday October 27, 2012
Last seen
March 4, 2014
-
Thanks...it worked...