I have one column (B) ( over 3k cells ):
TestUrl
__________________________________
http://www.testing.eu/test123.html
http://www.testing.eu/test154.html
http://www.testing.eu/test983.html
.. and so on ...
I want in column C, to get only the numbers:
Numbers
__________
123
154
983
..and so on..
How can I achieve this?
Best How To :
Using formula in column B:
=MID(A1,LEN("http://www.testing.eu/test") + 1, LEN(A1) - LEN(".html") - LEN("http://www.testing.eu/test"))
Using VBA and Regex:
Sub GetNumberFromURL()
Dim regEx As Object, matches As Object, cl As Range
Set regEx = CreateObject("vbscript.regexp")
regEx.Pattern = "([0-9]+)"
For Each cl In Range("A1:A10") //Update to suit your needs
Set matches = regEx.Execute(cl)
cl.Offset(0, 1) = matches.Item(0)
Next
End Sub