I'm trying to remove text after the second hyphen. Some cells have only one hyphen, while others have two. The below formula works with one hyphen
in C2 I have =LEFT(B2,FIND("@",SUBSTITUTE(B2,"-","@",LEN(B2)-LEN(SUBSTITUTE(B2,"character",""))))-1)
Example:
Where am I making a mistake?
Thanks
Josh
in C2 I have =LEFT(B2,FIND("@",SUBSTITUTE(B2,"-","@",LEN(B2)-LEN(SUBSTITUTE(B2,"character",""))))-1)
Example:
Col B | Col C - desired result |
sicu - r2 | sicu |
burnt - d9 | burnt |
A3 - OPP - R7 | A3 - OPP |
QPP - Ops - dev9 | OPP - Ops |
QPP - Ops - dev9 | OPP ----- what my formula outputs |
Where am I making a mistake?
Thanks
Josh