How do I get a specific text only like "LHS" or "RHS"?
Thank you for helping.
Provided that there are no other 3 character combinations ending with HS you can use: =MID(A1,SEARCH("?HS",A1)+1,3)
If you want to be sure to only find LHS or RHS use: =MID(A1,IFERROR(SEARCH("LHS",A1),SEARCH("RHS",A1))+1,3)
(Change A1 in the formula to the cell you like to search in)
Edit: Left out spaces in front and after search value to find result at end of beginning of text
Edit2: Added the spaces again, implementing Chris Neilsen's workaround:
=MID(" "&A1&" ",IFERROR(SEARCH(" LHS "," "&A1&" "),SEARCH(" RHS "," "&A1&" "))+1,3)
A1 in the formula with " "&A1&" "
LEFTorRIGHTand probablyFIND. See this siteREPLACERHS or LHS with empty string if wanting to rid it from the cellSUBSTITUTElike this=SUBSTITUTE(A1, " RHS ", " ")