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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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