I have a column with data:
New York is really nice, 456983 Good food
Beijing is awesome 678932, Nice culture.
... and so on
I want to extract the six digit numbers and place it in a column beside the original column.
There are n rows.
Is there any way to do this with a formula, without VBA?
Without VBA, you can use the following Excel formula assuming A1 is the cell containing the text.
=MID(A1,FIND("------",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"0","-"),"1","-"),"2","-"),"3","-"),"4","-"),"5","-"),"6","-"),"7","-"),"8","-"),"9","-")),6)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With