View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Need help with a formula...

On Wed, 6 Nov 2013 21:49:29 +0000, SarahAshlee wrote:


I need a formula that will allow a set of numbers to go from this:

xxxxxxxxxxxxxxx

to this:

xxxxx-xxxx-xxxx-xx


Every formula I've come across will only let me add three hyphens to a
set of numbers, where as, I need to add four. I really don't want to
have to do this manually. The hyphens in the example are placed where I
actually need them to be.

Can anyone help?!


If your number is in A1:

=TEXT(A1,"0000-0000-0000-00")

Or you can just custom format the cell using that code:

Number / Format / Custom / Type: 0000-0000-0000-00