Help with a formula to extract text clips out of strings. Turning
- SP BILL(DL/ON-SITE CONT) into DL/ON CONT
- ST MISC(TRAVEL) into TRAVEL
I'm having trouble removing "-SITE" from one cell without ruining the other. Here's what I have so far...
=MID(A1,FIND("(",A1)+1,FIND(")",A1,FIND("(",A1)+1)-1-FIND("(",A1))
Answer
Try this, updated to verify the cell in A1 is not blank and contains both ( and ) characters:
=IF(OR(ISERR(FIND("(",A1)),ISERR(FIND(")",A1)),ISBLANK(A1)),"",SUBSTITUTE(MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1),"-SITE",""))
No comments:
Post a Comment