#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Reformat numbers

Hello,
I have a bunch of 9 digit numbers in a column that I'd like reformatted.
I'd like to remove the leading zeros and put the remaining numbers in
xxxxxx-xx-x format. For instance:
123456789 becomes 123456-78-9
000012345 becomes 12-34-5

Thanks in advance,
Ellen

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Reformat numbers

try:

A1=number

in B1:


=TEXT(A1,"######-##-#")

"EllenM" wrote:

Hello,
I have a bunch of 9 digit numbers in a column that I'd like reformatted.
I'd like to remove the leading zeros and put the remaining numbers in
xxxxxx-xx-x format. For instance:
123456789 becomes 123456-78-9
000012345 becomes 12-34-5

Thanks in advance,
Ellen

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Reformat numbers

One way:

Format/Cells/Number/Custom #0-00-0


In article ,
EllenM wrote:

Hello,
I have a bunch of 9 digit numbers in a column that I'd like reformatted.
I'd like to remove the leading zeros and put the remaining numbers in
xxxxxx-xx-x format. For instance:
123456789 becomes 123456-78-9
000012345 becomes 12-34-5

Thanks in advance,
Ellen

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Reformat numbers

I use Custom Format #-##-# to get
123456789 to 123456-78-9
12345 to 12-34-5

But I do not understand you reference to leading zeros perhaps you already
have custom format to get them
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"EllenM" wrote in message
...
Hello,
I have a bunch of 9 digit numbers in a column that I'd like reformatted.
I'd like to remove the leading zeros and put the remaining numbers in
xxxxxx-xx-x format. For instance:
123456789 becomes 123456-78-9
000012345 becomes 12-34-5

Thanks in advance,
Ellen



  #5   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Reformat numbers

do you want just the display to have dashes or what is actually in the cell
for display format-cell-number-custom
0-00-0
this assumes what is in the cell is really a number and not text.


"EllenM" wrote:

Hello,
I have a bunch of 9 digit numbers in a column that I'd like reformatted.
I'd like to remove the leading zeros and put the remaining numbers in
xxxxxx-xx-x format. For instance:
123456789 becomes 123456-78-9
000012345 becomes 12-34-5

Thanks in advance,
Ellen



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Reformat numbers

Thanks to everyone who answered my question. All your quick responses worked!!

"Bernard Liengme" wrote:

I use Custom Format #-##-# to get
123456789 to 123456-78-9
12345 to 12-34-5

But I do not understand you reference to leading zeros perhaps you already
have custom format to get them
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"EllenM" wrote in message
...
Hello,
I have a bunch of 9 digit numbers in a column that I'd like reformatted.
I'd like to remove the leading zeros and put the remaining numbers in
xxxxxx-xx-x format. For instance:
123456789 becomes 123456-78-9
000012345 becomes 12-34-5

Thanks in advance,
Ellen




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Reformat numbers

Hi Bernard,
As for your mention of the leading zeros, the data is in the format of text,
I think. They've got a green triangle in the upper left side of the cell.
My first step was to convert the data to number with multiply in the paste
special box.

Ellen

"Bernard Liengme" wrote:

I use Custom Format #-##-# to get
123456789 to 123456-78-9
12345 to 12-34-5

But I do not understand you reference to leading zeros perhaps you already
have custom format to get them
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"EllenM" wrote in message
...
Hello,
I have a bunch of 9 digit numbers in a column that I'd like reformatted.
I'd like to remove the leading zeros and put the remaining numbers in
xxxxxx-xx-x format. For instance:
123456789 becomes 123456-78-9
000012345 becomes 12-34-5

Thanks in advance,
Ellen




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
Reformat spreadsheet JoP Excel Worksheet Functions 1 July 5th 07 06:09 PM
Reformat of a table [email protected] Excel Discussion (Misc queries) 2 December 7th 06 04:02 AM
Reformat column of telephone numbers Maree Excel Discussion (Misc queries) 2 March 1st 06 09:30 PM
Reformat telephone numbers in a column so all are formatted the s. Maree Excel Discussion (Misc queries) 2 March 1st 06 06:23 PM
How to reformat numbers stored as text (apostrophe at beginning) Dave Excel Discussion (Misc queries) 1 May 11th 05 02:34 AM


All times are GMT +1. The time now is 07:59 AM.

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"