Function onlynumbers(ByVal ref As String)
Dim rx As Object
Set rx = CreateObject("VBScript.RegExp")
With rx
.Pattern = "\D"
.Global = True
onlynumbers = .Replace(ref, "")
End With
End Function
Excel Workbook | ||||
---|---|---|---|---|
A | B | |||
7 | asdf4534asdf3 | 45343 | ||
Sheet3 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B7 | =onlynumbers(A7) |
Excel Workbook | ||||
---|---|---|---|---|
B | C | |||
5 | #N/A | 224290 | ||
Quality |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B5 | =VLOOKUP(C5,Agents!$J$2:$Q$640,MATCH("4DIGIT",Agents!$J$2:$Q$2,0),FALSE) | |
C5 | =MID(H5,FIND("(",H5)+1,FIND(")",H5)-FIND("(",H5)-1) |