Display match/cell contents if lookup contains specific text

MrSamExcel

Board Regular
Joined
Apr 6, 2016
Messages
51
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
What formula can match ID from ‘result’ tab with ID from ‘source’ tab and display the first cell in the same row of ‘source’ tab that matches partial/wildcard text string? Similar to a standard VLOOKUP or INDEX-MATCH however the value I’m looking for is not always in a single column but rather can appear anywhere in a range of columns.

Ex1) Enter formula on ‘result’ tab cell B2 that looks up ID from cell B1 from ‘source’ tab column A and returns the first cell in same row containing “*invest p*”? Formula would return “invest pro has X” from ‘source’ tab cell C2

Ex2) Same formula entered on ‘result’ tab cell B4 would produce value from ‘source’ tab E5: “invest pro has X”

Or even a filter/pivot method would suffice if it results in one column with ID and second column with "invest pro..." value.

Book3
AB
1IDRESULT
2900066invest pro has X
3900054invest pro has Y
4900499invest pro has X
result


Book3
ABCDE
1IDText1Text2Text3Text4
2900066name1invest pro has Xinvest stratother1
3900054name2invest pro has Yinvest stratother2
4900073name3invest pro has Yinvest stratother3
5900499name4otherinvest stratinvest pro has X
6900057name5otherinvest pro has Zinvest strat
source
 
Last edited:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hello MrSamExcel

Try this:
Excel Formula:
=VLOOKUP(A2,source!$A$2:$E$6,MAX(COLUMN(source!$C$2:$E$6)*MMULT(TRANSPOSE(--(source!$A$2:$A$6=A2)),--ISNUMBER(SEARCH("invest p",source!$C$2:$E$6)))),FALSE)
 
Upvote 0
Yes, excellent, thank you! I'm noting for future reference that this formula may need to be array confirmed with CTRL-SHIFT-ENTER depending on your version of Excel.
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,239
Members
452,898
Latest member
Capolavoro009

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