How to remove alphanumeric numbers from a column

James Lawson

New Member
Joined
Aug 31, 2011
Messages
1
Hi everyone,

I'm fairly new to excel so I am hoping that you might be able to help me out.

I have a column of fields with the following pattern:

CONTACT102764309

I wish to delete "CONTACT" from this so that every field in the column shows just the numeric values.
e.g.102764309

How can I do this?

With thanks

James
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
James welcome to the Forum,

Just use Find and Replace, and tell it to find Contact but replace with nothing, Highlight the column first
 
Upvote 0
Try this user-defined function:
Code:
Function OnlyNumeric(str) As Double
total = vbNullString
For i = 1 To Len(str)
    If IsNumeric(Mid(str, i, 1)) Then total = total & Mid(str, i, 1)
Next i
    OnlyNumeric = Val(total)
End Function

hope this helps
 
Upvote 0
Try:-
Code:
[COLOR=navy]Sub[/COLOR] MG31Aug20
[COLOR=navy]Dim[/COLOR] Rng [COLOR=navy]As[/COLOR] Range, Dn [COLOR=navy]As[/COLOR] Range, n
[COLOR=navy]Set[/COLOR] Rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))
[COLOR=navy]For[/COLOR] [COLOR=navy]Each[/COLOR] Dn [COLOR=navy]In[/COLOR] Rng
    [COLOR=navy]For[/COLOR] n = 1 To Len(Dn)
        [COLOR=navy]If[/COLOR] Mid(Dn, n, 1) Like "[0-9]" [COLOR=navy]Then[/COLOR] [COLOR=navy]Exit[/COLOR] For
    [COLOR=navy]Next[/COLOR] n
Dn = Right(Dn, Len(Dn) - n + 1)
[COLOR=navy]Next[/COLOR] Dn
[COLOR=navy]End[/COLOR] [COLOR=navy]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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