Forum Discussion
Andrew Hall
Oct 07, 2017Copper Contributor
Extract Text left of a character (that is after a certain portion of text)
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: 19_Decline_Left Barrel...
- Oct 07, 2017
Detlef,
As variant (without intermediate cells)
=IFERROR(LEFT(B3,SEARCH("_",B3,SEARCH("ORD",B3))),"")
Detlef_Lewin
Oct 07, 2017Silver Contributor
Andrew,
D3:F3
=SEARCH("ORD",B3) =SEARCH("_",MID(B3,D3,9^9)) =LEFT(B3,D3+E3-1)
- SergeiBaklanOct 07, 2017MVP
Detlef,
As variant (without intermediate cells)
=IFERROR(LEFT(B3,SEARCH("_",B3,SEARCH("ORD",B3))),"")
- Andrew HallOct 07, 2017Copper ContributorThanks Sergei.
- Detlef_LewinOct 07, 2017Silver Contributor
Definitely better, Sergei.
- Andrew HallOct 07, 2017Copper ContributorHi Detlef,
It worked.
Thanks for the quick reply. Appreciate it.