partial string lookup across multiple columns

goong522

New Member
Joined
Dec 19, 2014
Messages
13
a
b
c
d
e
f
1
dog
dog1
dog 2
dogs
Dogs
2
cat
cats
cat1
cat 2
Cat
3
hamster
hamsters
hamster1
hamster 2
hamster
4

<tbody>
</tbody>
hi all - Happy New Year.
I was hoping the Excel guru's on this forum can assist me with my issue.

I currently have the above worksheet. Table would be defined as A1:D3. I'm looking for a formula to put in cell F1 that will take the value of cell E1 (which is "Dogs"), and look for a partial match in table A1:D3 (look for any instance that might have "Dogs", an return the corresponding value of column A. So looking for cell E2- instances of "Dogs", it would cell D1 ("dogs") and return cell A1 - "dog"

thank you in advance for the help!
 
THANK YOU SO MUCH ALADIN! IT WORKS!

You are welcome.

I have a follow up question - my possible table (which is A1:D3 in my example) will most likely expand to A1:D2000. when I try to adjust the formula you posted above, I get a lot of mismatches (incorrect results). and is there a way to add something to the formula so if no matches (or partial matches) are found, it would result in "no matches"?


You can wrap up the formula in an IFERROR call... Still control+shift+enter:

=IFERROR(LOOKUP(9.99999999999999E+307,1/MMULT(ISNUMBER(SEARCH(E1,$A$1:$D$3))+0,TRANSPOSE(COLUMN($A$1:$D$3)^0)),$A$1:$A$3),"no match found")

I
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You are welcome.




You can wrap up the formula in an IFERROR call... Still control+shift+enter:

=IFERROR(LOOKUP(9.99999999999999E+307,1/MMULT(ISNUMBER(SEARCH(E1,$A$1:$D$3))+0,TRANSPOSE(COLUMN($A$1:$D$3)^0)),$A$1:$A$3),"no match found")

I

that's it! thanks again so much for the help!
 
Upvote 0

Forum statistics

Threads
1,213,520
Messages
6,114,101
Members
448,548
Latest member
harryls

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