I want to extract numbers from string.
Example tyouy890ty --> I want output = 890
Please guide me about it.
I want to extract numbers from string.
Example tyouy890ty --> I want output = 890
Please guide me about it.
A very common request, with just as many ways to do it - VBA or Formulas.
For example: https://www.educba.com/extract-number-from-string/
Or look at the 'Similar Threads' list below
I have the below saved as my preferable way to do it without having to add any references to the VBE:
The above will include characters like: *+,-./Please Login or Register to view this content.
If you wanted to remove those '*+,-./' then you could use
The below is a reference as to what characters are being kept/ removed:Please Login or Register to view this content.
https://docs.microsoft.com/en-us/off...acter-set-0127
If things don't change they stay the same
If Textjoin function is available
ARRAY formula
=TEXTJOIN("",TRUE,IF(ISNUMBER(FIND(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),"0123456789")),MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),""))
Pl note
Array formula should be confirmed with Ctrl+Shift+Enter keys together.
If answere is satisfactory press * to add reputation.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks