Separating numbers and alphabet into different cells.

omairhe

Well-known Member
Joined
Mar 26, 2009
Messages
2,040
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I have data in cell ref A1 which look something like this. ..

Abc def 47

so a formula in cell B1 should output value = Abc def and similarly in cell C1 output = 47

more examples:-

A1 = Abc
B1 = Abc
C1 =

A1 = Abc 5 0 1
B1 = Abc
C1 = 501

A1 = 50 0
B1 =
C1 = 500

A1 = Abc 50 40 Xyz 5
B1 = Abc Xyz
C1 = 50405


Thank u.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Code:
Sub aParse1()
Dim vTxt, vNum, vWord, vChr
Dim i As Integer


Range("a1").Select
While ActiveCell.Value <> ""
   vWord = ActiveCell.Value
   For i = 1 To Len(vWord)
      vChr = Mid(vWord, i, 1)
      If IsNumeric(vChr) Then
         vNum = vNum & vChr
      Else
         vTxt = vTxt & vChr
      End If
   Next
   ActiveCell.Offset(0, 1).Value = vTxt
   ActiveCell.Offset(0, 2).Value = vNum
   vTxt = ""
   vNum = ""
   
   NextRow
Wend


End Sub


Private Sub NextRow()
ActiveCell.Offset(1, 0).Select
End Sub
 
Upvote 0
Hello ranman356,

Would it be possible for you to please make two different formulas that goes in B1 and C1.

I,m actually aiming for the formula..

Appreciate it...
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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