Split numbers in a cell to separate cells

uncleslinky

New Member
Joined
Mar 31, 2009
Messages
47
Hi guys,


I have a multiple numbers in a cell which I need to split into seperate cells.


For example, in A1 I have: 4-1 (0-1)


I would like to split this so each number is in it's own cell...


B1 - 4
C1 - 1
D1 - 0
E1 - 1


In this example each number is a single digit however numbers may sometimes be two digits and therefore I wasn't able to find a simple way using just 'left' or 'right'.


I've been experimenting with "find" to locate the position of "-" and "(" but so far I'm a little stumped on what to do next. To extract the first number I've come up with:


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


This seems to extract the number and the -1 removes the hyphen but I'm having trouble working on the other numbers. Any ideas? :D


Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
B1 :
=TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("-"&A$1,"(","-"),")",),"-",REPT(" ",30)),ROW(1:1)*30,30))
Copy down
 
Upvote 0
B1 :
=TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("-"&A$1,"(","-"),")",),"-",REPT(" ",30)),ROW(1:1)*30,30))
Copy down


Hi, thanks for the reply

That works as you say by dragging down the sheet but is it possible to have the numbers separated horizontally into B1, C1, D1, E1?

Thanks again
 
Upvote 0
B1 :
=TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("-"&$A1,"(","-"),")",),"-",REPT(" ",30)),COLUMNS($A1:A1)*30,30))
Copy across
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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