Extracting numbers in alphanumeric cells (but in different places!)

vespervesper

New Member
Joined
May 24, 2011
Messages
1
Screen_shot_2011-05-24_at_19.09.19.png


I have something like the above. I wish to extract only the numbers from the "Skills" column - but the numbers themselves aren't always an exact character length (although usually 5-6), and they aren't always in the same place (sometimes leading, sometimes ending).

Also: - and I have no idea of this is possible - can you do the above but also show the other columns, something like a filter? But really the first question is more important :)

Many thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Paste this User Defined Function (UDF) in a Standard Module - then you will be able to use it in a regular worksheet as I have done in Cells E2:E5.

Code:
Function num(inpt As String)
     Dim i As Integer
     For i = 1 To Len(inpt)
         If IsNumeric(Mid(inpt, i, 1)) Then
             num = num & Mid(inpt, i, 1)
         End If
     Next i
     num = CLng(num)
End Function
Excel Workbook
ABCDE
1SkillsCityStatusNumb Only
2Handyman,182840182840
3Electrician
4Fabric,1758617586
5184759,Gas184759
Sheet1
Excel 2007
Cell Formulas
RangeFormula
E2=IF(num(A2)>0,num(A2),"")
E3=IF(num(A3)>0,num(A3),"")
E4=IF(num(A4)>0,num(A4),"")
E5=IF(num(A5)>0,num(A5),"")
 
Upvote 0
A CSE formula like
=MAX(IFERROR((MID(E1&REPT("x",255), COLUMN(A1:Z107), ROW(A1:Z107)))+0,0))

will do what you want
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,421
Members
452,913
Latest member
JWD210

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