Hello. I really would need some big help with extracting multiple numbers series from text and I hope that someone can and will give me an advice.
I have a big column of text data in excel ( thousands of rows) where every cell contains multiple letters and number series.
Cells are not similar at all as formatting and length. Numbers series are placed in different positions of the text and in every cell there are from one to 20 series of numbers.
One cell looks like this :
A1: John Smith adress 123454 phone 754777755
B2: Adress 12343 Bob Innerside gets 1000 $
I would really need a VBA or a function to extract all these series of number, in a different column or in different columns, results being separated somehow ( comma for example)
I made some research and I only found an UDF called GetNumber, that can get me only ONE number series ( the first one met).
It looks likes this :
Function GetNumber(Cell As Range)
For N = 1 To Len(Cell)
If (Mid(Cell, N, 1) = " " Or N = Len(Cell)) And MyNumber <> "" Then
GetNumber = MyNumber
Exit Function
End If
If IsNumeric(Mid(Cell, N, 1)) And Mid(Cell, N, 1) <> " " Then
MyNumber = MyNumber & Mid(Cell, N, 1)
End If
Next N
End Function
I really don`t know how to modify it so I could get ALL the numbers series from the cell`s text.
Thank you for your attention and future help.
tudorr
I have a big column of text data in excel ( thousands of rows) where every cell contains multiple letters and number series.
Cells are not similar at all as formatting and length. Numbers series are placed in different positions of the text and in every cell there are from one to 20 series of numbers.
One cell looks like this :
A1: John Smith adress 123454 phone 754777755
B2: Adress 12343 Bob Innerside gets 1000 $
I would really need a VBA or a function to extract all these series of number, in a different column or in different columns, results being separated somehow ( comma for example)
I made some research and I only found an UDF called GetNumber, that can get me only ONE number series ( the first one met).
It looks likes this :
Function GetNumber(Cell As Range)
For N = 1 To Len(Cell)
If (Mid(Cell, N, 1) = " " Or N = Len(Cell)) And MyNumber <> "" Then
GetNumber = MyNumber
Exit Function
End If
If IsNumeric(Mid(Cell, N, 1)) And Mid(Cell, N, 1) <> " " Then
MyNumber = MyNumber & Mid(Cell, N, 1)
End If
Next N
End Function
I really don`t know how to modify it so I could get ALL the numbers series from the cell`s text.
Thank you for your attention and future help.
tudorr