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...
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
"A" column contains "Member # 308166 RCI Number 4801-60436". I wanna split this in "B" and "C"as "Member # RCI Number" and "308166 4801-60436". but our prior most motive is to seperate the numericals.
 
Upvote 0
Select the whole column, Press Ctrl + H --> In the "Find what" box, type: "RCI Number" (without quotes). Leave the "Replace with" box empty and click on "Replace All" and finally click on Close.
 
Upvote 0
Hi

A formula based approach could be:

assuming text values in column A then in B to get the member number:

=TRIM(MID(A1,FIND("#",A1)+1,FIND("RCI",A1)-FIND("#",A1)-1))

and col C to get the RCI number:

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",50)),50))

copy formulas down as required.
 
Upvote 0
But the problem is I dont have unique data, "A" column contains data in zigzag like below:
"CM Member # 42628 RCI Member # 480128309"
"CM Mem # 48475 name: Kapadia Jay"
"member # A20322010254 Name: S.S., Nagarsenker"
"Guest of R K Patnia M# 2001a3010216"

I need to extract only numeric value :rolleyes:
 
Upvote 0
better if there is any direct method to extract only numeric value with using formula or macro... pls let me know if there is something...:oops:
 
Upvote 0
The following VBA function will extract all the numeric digits within the referenced cell. Separate strings of numeric digits will be delimited by commas:

Code:
Function GetNumbers(s As String)
Dim temp As String, i As Long, oMatches
With CreateObject("vbscript.regexp")
    .Global = True
    .Pattern = "\d+"
    If .test(s) Then
        Set oMatches = .Execute(s)
        For i = 0 To oMatches.Count - 1
            temp = temp & oMatches(i) & ","
        Next i
        GetNumbers = Left(temp, Len(temp) - 1)
    End If
End With
End Function

Stick in a standard module then use in the sheet like:

=GetNumbers(A1)
 
Upvote 0

Forum statistics

Threads
1,216,107
Messages
6,128,866
Members
449,475
Latest member
Parik11

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