Separating Alpha and Numeric

maheshmaxi

Active Member
Joined
Dec 16, 2008
Messages
252
Hi

I have data in column with combination of alpha-numeric like "Member # 308166 RCI Number 4801-60436". can I split this without using copy and paste?

Pls help me regarding...
 
And another RegEx one:

Code:
Function GetNumbers(s As String)
 
With CreateObject("vbscript.regexp")
    .Global = True
    .Pattern = "\D+"
    GetNumbers = Replace(Application.Trim(.Replace(s, " ")), " ", ",")
End With
End Function
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
in F4: =-LOOKUP(1,-LEFT(C4,{1,2,3,4,5,6}))

in G4: =-LOOKUP(1,-RIGHT(LEFT(D4,FIND("m",D4)-1),{1,2,3,4,5,6,7}))

Hi pgc01,

Thankyou for your solution, and I thought you would need a function to do it; who would think that those simple strings were that powerful, it is exactly the result I was after.


Cheers :bow:
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,122
Members
452,381
Latest member
Nova88

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