Finding multiple key words from a cell

Ronnie10150

New Member
Joined
Jul 12, 2018
Messages
2
Hi I’m trying to find the keywords of “LHS” and “RHS” in a cell, by only using the functions LEFT, RIGHT, MID, LEN, FIND and TRIM. I’ve tried the following formula

=MID(B6, FIND({“LHS”, “RHS”}),B6),3)
where B6, and all cells in that column contain fext, each of which have either LHS in or RHS in.
The problem I’m having is that whilst it works for the first cell, it does not work for the remainder.
I was wondering if anyone could help me with this and tell me what I’m doing wrong
Kind regards
Ronnie
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi & welcome to the board
Is this homework?
 
Last edited:
Upvote 0
Not sure how to do it with just the functions you've listed, but you could do it like
=MID(B6,OR(ISNUMBER(FIND({"LHS","RHS"},B6))),3)
 
Upvote 0

Forum statistics

Threads
1,215,002
Messages
6,122,652
Members
449,092
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top