How do I split numbers and data into 2 seperate cells

ghrek

Active Member
Joined
Jul 29, 2005
Messages
427
I have a workbook that has numbers and data in the same cell but trying to split into 2 seperate cells. Any ideas on how I can do it.

They are all in column B and need split into column's B & C

example shown below

?10 VOUCHER GTR 92087
ABERDEEN TAXI 92030
ABTA COMMISSION ERTC 92334
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You probably mean this

VBA Code:
Sub jec()
 Dim it, sq
 For Each it In Range("B1", Range("B" & Rows.Count).End(xlUp))
   sq = StrReverse(Split(StrReverse(it), " ")(0))
   it.Offset(, 1).Value = sq
   it.Value = Trim(Replace(it, sq, ""))
 Next
End Sub
 
Upvote 0
Hi,

Not sure what you want, as your description is not clear, and you did not show any expected results:

Book3.xlsx
ABC
1?10 VOUCHER GTR 92087?10 VOUCHER GTR92087
2ABERDEEN TAXI 92030ABERDEEN TAXI92030
3ABTA COMMISSION ERTC 92334ABTA COMMISSION ERTC92334
Sheet1047
Cell Formulas
RangeFormula
B1:B3B1=LEFT(A1,LEN(A1)-LEN(C1)-1)
C1:C3C1=RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)+0
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,043
Members
452,542
Latest member
Bricklin

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