Oct 07 2017 01:24 AM
Hi, I want to extract the first portion of text with special conditions. I want everything left of the underscore that is after the characters ORD.
Here is an example:
Thank you. Any advice?
Oct 07 2017 01:33 AM
Andrew,
D3:F3
=SEARCH("ORD",B3) =SEARCH("_",MID(B3,D3,9^9)) =LEFT(B3,D3+E3-1)
Oct 07 2017 01:44 AM
Oct 07 2017 04:08 AM
SolutionDetlef,
As variant (without intermediate cells)
=IFERROR(LEFT(B3,SEARCH("_",B3,SEARCH("ORD",B3))),"")
Oct 07 2017 04:35 AM
Definitely better, Sergei.
Oct 07 2017 04:48 AM
Oct 07 2017 04:08 AM
SolutionDetlef,
As variant (without intermediate cells)
=IFERROR(LEFT(B3,SEARCH("_",B3,SEARCH("ORD",B3))),"")