PC Review


Reply
Thread Tools Rate Thread

Add hyphens to a number

 
 
texasphil
Guest
Posts: n/a
 
      11th May 2006

In one column, each cell has a 16 digit number. I need to put hyphens
between 4 different numbers in each cell. Each cell/number will have
the hyphen in the same place. I was successful doing this once I
believe through Format\Cells\Number\Custom but I did not write down the
steps how to do it.
Any clues?

Thanks

texasphil


--
texasphil
------------------------------------------------------------------------
texasphil's Profile: http://www.excelforum.com/member.php...o&userid=32615
View this thread: http://www.excelforum.com/showthread...hreadid=541305

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      12th May 2006
You didn't use format|cells|number|custom with that 16 digit number.

Excel only stores 15 significant digits. The one's digit in any 16 digit number
will be 0.

But you could store the 16 digit "number" as text--either by preceding the data
entry with an apostrophe:

'1234123412341234

or by preformatting the cell (or range of cells) as text
Format|Cells|number tab|Text

Then if you have a 16 character "number" in A1, you could use this formula in
B1:

=left(a1,4)&"-"&mid(a1,5,4)&"-"&mid(a1,9,4)&"-"&right(a1,4)

To get the look that you want.



texasphil wrote:
>
> In one column, each cell has a 16 digit number. I need to put hyphens
> between 4 different numbers in each cell. Each cell/number will have
> the hyphen in the same place. I was successful doing this once I
> believe through Format\Cells\Number\Custom but I did not write down the
> steps how to do it.
> Any clues?
>
> Thanks
>
> texasphil
>
> --
> texasphil
> ------------------------------------------------------------------------
> texasphil's Profile: http://www.excelforum.com/member.php...o&userid=32615
> View this thread: http://www.excelforum.com/showthread...hreadid=541305


--

Dave Peterson
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Hyphens in a number stiring in a cell =?Utf-8?B?S2V2aW4gQg==?= Microsoft Excel Misc 0 4th Oct 2006 09:48 PM
RE: Hyphens in a number stiring in a cell =?Utf-8?B?TWFyY2Vsbw==?= Microsoft Excel Misc 0 4th Oct 2006 09:47 PM
Remove Hyphens from a number Mike Microsoft Excel Misc 2 7th Jul 2004 04:10 AM
Adding Hyphens in a number Tom Perot Microsoft Excel Programming 1 30th Jan 2004 04:46 PM
Removing Hyphens from a Number Trebor249 Microsoft Excel Misc 4 13th Jan 2004 08:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:47 PM.