Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Need help with a formula...

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?!
  #2   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by Ron Rosenfeld[_2_] View Post
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


Neither of those options worked.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Need help with a formula...

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.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default Need help with a formula...

On Thu, 7 Nov 2013 16:49:51 +0100, Claus Busch wrote:


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.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Need help with a formula...

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.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula autofill to cells below – formula arguments are cell areas in different columns [email protected] Excel Discussion (Misc queries) 1 September 7th 12 09:15 PM
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"