text to columns

uzbeklana

New Member
Joined
Jun 29, 2004
Messages
10
I am trying to sort out some information by separating a column which contains numbers like 1-xxx and xxxx. Most of the numbers that don't have a "1-" in front of it have three zero's and then another number (e.g. 00000, 00009). I want to retain those 0's. I have the column in "text" form so it will do so. BUT, when I do the text to columns with the "-" as the delimited character, the 00000 turns into 0 or 00009 turns into 9, which is precisely what I don't want.
Suggestions on what to do, please?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
uzbeklana said:
I am trying to sort out some information by separating a column which contains numbers like 1-xxx and xxxx. Most of the numbers that don't have a "1-" in front of it have three zero's and then another number (e.g. 00000, 00009). I want to retain those 0's. I have the column in "text" form so it will do so. BUT, when I do the text to columns with the "-" as the delimited character, the 00000 turns into 0 or 00009 turns into 9, which is precisely what I don't want.
Suggestions on what to do, please?

You could use a formula set like...

B2:

=LEFT(A2,SEARCH("-",A2)-1)

C2:

=REPLACE(A2,1,SEARCH("-",A2),"")
 

Forum statistics

Threads
1,147,620
Messages
5,742,177
Members
423,708
Latest member
vagosh2001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top