I have to extract a text from String, between "-" and "x"
But "-" I need to find from left side and "x" I need to find it from right side
In another words : between First "-" from left side and First "x" from right side
I have to extract a text from String, between "-" and "x"
But "-" I need to find from left side and "x" I need to find it from right side
In another words : between First "-" from left side and First "x" from right side
Last edited by AliGW; 01-17-2020 at 05:41 PM.
A bit long-wounded but try this
=TRIM(RIGHT(SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(A1,"x",REPT(" ",255),LEN(A1)-LEN(SUBSTITUTE(A1,"x",""))),255)),"-",REPT(" ",255)),255))
Life's a spreadsheet, Excel!
Say thanks, Click *
Or this:
Formula:
=TRIM(MID(SUBSTITUTE(SUBSTITUTE(A1,"x","-"),"-",REPT(" ",255)),255,255))
v A B 1 But "-" I need to find from left side and "x" I need to find it from right side " I need to find from left side and " 2 In another words : between First "-" from left side and First "x" from right side " from left side and First "
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
For some reason, none of formulas above, works !
I need to extract between First Left "-" and First Right "x"
Regardless how many "-" or "x" are in string...
It may help if you provide an instance where the formulas don't work so that we can attempt modification.
Let us know if you have any questions.
Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.
Try this;
Formula:
=SUBSTITUTE(MID(A1,FIND("-",A1,1)+1,FIND("x",A1,1)+1),RIGHT(A1,LEN(A1)-FIND("x",A1,1)+1),"")
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks