Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 192
Default Adding Dashes to a 25 digit alphanumeric cell

I have a column of 30-5k consisting of a 25 digit alphanumeric code. I need
to reformat these to have dashes every 5 characters. example:
XXXXXXXXXXXXXXXXXXXXXXXXXX
to
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Is there a custom format string that I can use to do this automatically? My
right arrow key is getting worn down here, :P

Thanks in advance,

Nick
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Adding Dashes to a 25 digit alphanumeric cell

Select your numeric range and right click to activate the short cut menu.
SElect Format Cells and click the Number Tab. Scroll down the Category panel
and select Custom and then place the following mash in the Type field:

#####-#####-#####-#####-#####
--
Kevin Backmann


"Nick" wrote:

I have a column of 30-5k consisting of a 25 digit alphanumeric code. I need
to reformat these to have dashes every 5 characters. example:
XXXXXXXXXXXXXXXXXXXXXXXXXX
to
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Is there a custom format string that I can use to do this automatically? My
right arrow key is getting worn down here, :P

Thanks in advance,

Nick

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 192
Default Adding Dashes to a 25 digit alphanumeric cell

Thanks for the quick reply, Kevin.

I tried that string before I posted to this forum, but it does not work.
Maybe since it's alphanumeric?

Any other ideas, or maybe I'm not doing something right?

Nick

"Kevin B" wrote:

Select your numeric range and right click to activate the short cut menu.
SElect Format Cells and click the Number Tab. Scroll down the Category panel
and select Custom and then place the following mash in the Type field:

#####-#####-#####-#####-#####
--
Kevin Backmann


"Nick" wrote:

I have a column of 30-5k consisting of a 25 digit alphanumeric code. I need
to reformat these to have dashes every 5 characters. example:
XXXXXXXXXXXXXXXXXXXXXXXXXX
to
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Is there a custom format string that I can use to do this automatically? My
right arrow key is getting worn down here, :P

Thanks in advance,

Nick

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Adding Dashes to a 25 digit alphanumeric cell

That will not work, Excel can only display 15 digits the rest will be
truncated to zero
The OP obviously is using text values for this and they cannot be formatted
the same way a number can.



--
Regards,

Peo Sjoblom




"Kevin B" wrote in message
...
Select your numeric range and right click to activate the short cut menu.
SElect Format Cells and click the Number Tab. Scroll down the Category
panel
and select Custom and then place the following mash in the Type field:

#####-#####-#####-#####-#####
--
Kevin Backmann


"Nick" wrote:

I have a column of 30-5k consisting of a 25 digit alphanumeric code. I
need
to reformat these to have dashes every 5 characters. example:
XXXXXXXXXXXXXXXXXXXXXXXXXX
to
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Is there a custom format string that I can use to do this automatically?
My
right arrow key is getting worn down here, :P

Thanks in advance,

Nick



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Adding Dashes to a 25 digit alphanumeric cell

On Mon, 27 Aug 2007 08:14:00 -0700, Nick
wrote:

I have a column of 30-5k consisting of a 25 digit alphanumeric code. I need
to reformat these to have dashes every 5 characters. example:
XXXXXXXXXXXXXXXXXXXXXXXXXX
to
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Is there a custom format string that I can use to do this automatically? My
right arrow key is getting worn down here, :P

Thanks in advance,

Nick


Use a formula of the type:

=LEFT(A1,5)&"-"&MID(A1,6,5)&"-"&MID(A1,11,5) ... &RIGHT(A1,5)

Fill down as far as required.

Then select the column and do Edit/Paste Special/Values

You can then delete (or hide) the originals

--ron


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Adding Dashes to a 25 digit alphanumeric cell

You cannot format text the same ways you format a number

=LEFT(A1,5)&"-"&MID(A1,6,5)&"-"&MID(A1,11,5)&"-"&MID(A1,16,5)&"-"&MID(A1,21,5)



--
Regards,

Peo Sjoblom



"Nick" wrote in message
...
I have a column of 30-5k consisting of a 25 digit alphanumeric code. I
need
to reformat these to have dashes every 5 characters. example:
XXXXXXXXXXXXXXXXXXXXXXXXXX
to
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Is there a custom format string that I can use to do this automatically?
My
right arrow key is getting worn down here, :P

Thanks in advance,

Nick



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Adding Dashes to a 25 digit alphanumeric cell

That works for numbers, but the OP said "alphanumeric" (and of course if
they'd been numbers the last 10 digits would have been zeroes as Excel can
cope with only 15 significant digits for numbers).

In which case, I think he needs a helper column:
=LEFT(A1,5)&"-"&MID(A1,6,5)&"-"&MID(A1,11,5)&"-"&MID(A1,16,5)&"-"&RIGHT(A1,5)If he wishes to do so, he could paste special values over the original codesif he no longer wants those.--David Biddulph"Kevin B" wrote in ... Select your numeric range and right click to activate the short cut menu. SElect Format Cells and click the Number Tab. Scroll down the Categorypanel and select Custom and then place the following mash in the Type field: #####-#####-#####-#####-##### -- Kevin Backmann "Nick" wrote: I have a column of 30-5k consisting of a 25 digit alphanumeric code. Ineed to reformat these to have dashes every 5 characters. example: XXXXXXXXXXXXXXXXXXXXXXXXXX to XXXXX-XXXXX-XXXXX-XXXXX-XXXXX Is there a custom format string that I can use to do this automatically?My right arrow key is getting worn down here, :P Thanks in advance, Nick

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 192
Default Adding Dashes to a 25 digit alphanumeric cell

Thank you all who replied to this thread! Problem solved, using the formula
below and copy-pasting the values back into column A!

I love this forum!!

Nick

"Peo Sjoblom" wrote:

You cannot format text the same ways you format a number

=LEFT(A1,5)&"-"&MID(A1,6,5)&"-"&MID(A1,11,5)&"-"&MID(A1,16,5)&"-"&MID(A1,21,5)



--
Regards,

Peo Sjoblom



"Nick" wrote in message
...
I have a column of 30-5k consisting of a 25 digit alphanumeric code. I
need
to reformat these to have dashes every 5 characters. example:
XXXXXXXXXXXXXXXXXXXXXXXXXX
to
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Is there a custom format string that I can use to do this automatically?
My
right arrow key is getting worn down here, :P

Thanks in advance,

Nick




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
Adding to the row digit in the cell reference bobby Excel Discussion (Misc queries) 2 May 30th 07 07:49 PM
Generate alphanumeric unique 4 digit values from 12 digit values mikep Excel Worksheet Functions 5 February 9th 07 08:59 PM
Adding a 0 to a four digit number jermsalerms Excel Discussion (Misc queries) 5 January 13th 06 10:50 PM
Color a single digit in a mult-digit number cell Phyllis Excel Discussion (Misc queries) 6 November 17th 05 12:46 AM
Adding a digit cj21 Excel Discussion (Misc queries) 4 November 1st 05 02:10 PM


All times are GMT +1. The time now is 10:52 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"