Need help with a formula...

S

SarahAshlee

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
set of numbers, where as, I need to add four. I really don't want t
have to do this manually. The hyphens in the example are placed where
actually need them to be.

Can anyone help?
 
R

Ron Rosenfeld

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
 
S

SarahAshlee

'Ron Rosenfeld[_2_ said:
;1614819']On Wed, 6 Nov 2013 21:49:29 +0000, SarahAshle
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 wher 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



Neither of those options worked
 
C

Claus Busch

Hi Sarah,

Am Thu, 7 Nov 2013 14:32:22 +0000 schrieb SarahAshlee:
Neither of those options worked.

both suggestions work. But you have to modify them:
Formula for value in A1:
=TEXT(A1,"00000-0000-0000-00")
or
Number / Format / Custom / Type: 00000-0000-0000-00


Regards
Claus B.
 
R

Ron Rosenfeld

both suggestions work. But you have to modify them:
Formula for value in A1:
=TEXT(A1,"00000-0000-0000-00")
or
Number / Format / Custom / Type: 00000-0000-0000-00


Regards
Claus B.

Oh, these poor aging eyes. Thanks for picking up the extra "x" I missed.
Hopefully, that is what Sarah noted when she wrote that neither worked.
 
C

Claus Busch

Hi Ron,

Am Fri, 08 Nov 2013 06:39:06 -0500 schrieb Ron Rosenfeld:
Oh, these poor aging eyes. Thanks for picking up the extra "x" I missed.
Hopefully, that is what Sarah noted when she wrote that neither worked.

not at all. I also need glasses ;-)


Regards
Claus B.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top