Separating digits of number in each cell?

ExxcelNoob

Board Regular
Joined
Apr 30, 2012
Messages
138
separating.png


Hello everyone, as you can see in the picture;

it is possible to separate numbers from Column A into each column of B and C?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
WAIT! what if I have 72-120 in A1?

I don't want the dash sign include it.
Unless you are going to change values in Column A, your best bet is to use the Text-To-Columns functionality that Excel provides. Not sure of your version, but if XL2003 its on the Data menu item and if XL2007 (and I guess XL2010 as well... don't have that version installed) is on the Data tab. Select Column A, activate the Text-To-Columns dialog, select Delimited on Step 1 of 3 page and click Next... put a check mark in the checkbox labeled "Other" and put a dash in the field next to it, then click Next... type $B$1 in the Destination field and click Finish.

If you need a formula solution, then...

=LEFT(A1,FIND("-",A1&"-")-1)
=MID(A1,FIND("-",A1&"-")+1,9)

where the 9 assumes you will never have more than 9 characters following that dash. By the way, for future questions you may ask... if you data is not all consistent in "shape", give us examples that show the differences so we can give you the best answer for what you actually have to work with. In this case, showing us 3 examples with 3 characters before the dash does not indicate to us that there might only be 2 characters in front of the dash (or, perhaps, more than 3).
 
Last edited:
Upvote 0
Unless you are going to change values in Column A, your best bet is to use the Text-To-Columns functionality that Excel provides. Not sure of your version, but if XL2003 its on the Data menu item and if XL2007 (and I guess XL2010 as well... don't have that version installed) is on the Data tab. Select Column A, activate the Text-To-Columns dialog, select Delimited on Step 1 of 3 page and click Next... put a check mark in the checkbox labeled "Other" and put a dash in the field next to it, then click Next... type $B$1 in the Destination field and click Finish.

If you need a formula solution, then...

=LEFT(A1,FIND("-",A1&"-")-1)
=MID(A1,FIND("-",A1&"-")+1,9)

where the 9 assumes you will never have more than 9 characters following that dash. By the way, for future questions you may ask... if you data is not all consistent in "shape", give us examples that show the differences so we can give you the best answer for what you actually have to work with. In this case, showing us 3 examples with 3 characters before the dash does not indicate to us that there might only be 2 characters in front of the dash (or, perhaps, more than 3).

OK lol thank you everyone, i'm so noob at this. THANK YOU !! :biggrin:
 
Upvote 0
separating.png


Hello everyone, as you can see in the picture;

it is possible to separate numbers from Column A into each column of B and C?
Here are my offerings.

Book1
ABC
1123-012123012
2123-456123456
3123-789123789
Sheet1

This formula entered in B1 and copied down:

=LEFT(A1,FIND("-",A1)-1)

This formula entered in C1 and copied down:

=MID(A1,LEN(B1)+2,15)
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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
Back
Top