Hi,
I have got a cell with content of texts and values and wish to extract a value from it
I have attached a sample for clarity
Thanks
Vito
Hi,
I have got a cell with content of texts and values and wish to extract a value from it
I have attached a sample for clarity
Thanks
Vito
Hi vito,
See if this works for you.
Extract Value from String with -SERV.xlsx
If not then give more examples of your strings.
Edit: I had to see how "pretty" my formula was. It looks like this:
Formula:=TRIM(RIGHT(SUBSTITUTE(TRIM(MID(B3,FIND("-",B3)-15,15))," ",REPT(" ",50)),50))
Last edited by MarvinP; 08-07-2019 at 06:24 PM.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
hey thanks, it works great!!!!
I don't know if it's the most efficient formula [EDIT: Marvin's is prettier], but I think this will work in D3:
=MID(B3,FIND("@",SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ","@",LEN(LEFT(B3,SEARCH(",",B3)))-LEN(SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ",""))))+1,SEARCH(",",B3)-FIND("@",SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ","@",LEN(LEFT(B3,SEARCH(",",B3)))-LEN(SUBSTITUTE(LEFT(B3,SEARCH(",",B3))," ",""))))+2)
Fill down as needed. It is predicated upon finding the first comma and returning everything from the preceding space through two characters after the first comma. As long as column B fits that mold, it should work.
Note that Excel will recognize the result in D3 as a text string, but you can add a "+0" should you need it be recognized as a number.
If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".
If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
https://www.excelforum.com/the-water...ke-thread.html
hey, and if I need to select the second value after the text "-SERV"?
D3=TRIM(MID(SUBSTITUTE($B3," ",REPT(" ",50)),FIND("^",SUBSTITUTE(SUBSTITUTE($B3," ",REPT(" ",50)),",","^",COLUMN(A1)))-20,50))
copy to right to extract the 2nd,3rd,4th....*,* value (if has)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks