Index match with one exact criteria and one contains partial text criteria

yoshik

New Member
Joined
Dec 7, 2022
Messages
2
Office Version
  1. 2021
Platform
  1. MacOS
Hello,

I'm trying to tweak the usual index match formula with multiple criteria to allow one criterion to be: if the cell contains.
Normal: =INDEX(LOOKUPARRAY,MATCH(VALUE1&VALUE2,LOOKUPCOLUMN1&LOOKUPCOLUMN2,0),1)
What I'm trying to do, but this doesn't work: =INDEX(LOOKUPARRAY,MATCH(VALUE1&("*"&VALUE2*"*"),LOOKUPCOLUMN1&LOOKUPCOLUMN2,0),1)

This might be clearer in an example spreadsheet.

What I want is to return the value from the cell in column A, if column B = Updated Response and column C contains "phq9_"

Multiplecriteriacontainsexample.xlsx
ABC
112/8/22 11:16Manage/Design Edit report
212/8/22 11:14Manage/Design abcs, phq9_start
312/8/22 11:12Manage/Design Copy report
412/8/22 7:51Updated Responseend3wpd2
512/8/22 7:51Sent alert Record CPG1251_LauraS (Preliminary 1 Covid *PT*)Alert #74
612/8/22 7:55Updated Responsemistakes
712/8/22 7:50Updated Responseabcs, phq9_start
812/8/22 7:53Updated ResponseEdit report
Sheet1


Thanks
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If your version of Excel has the FILTER function try:

Book4
ABC
112/8/22 11:16Manage/DesignEdit report
212/8/22 11:14Manage/Designabcs, phq9_start
312/8/22 11:12Manage/DesignCopy report
412/8/22 7:51Updated Responseend3wpd2
512/8/22 7:51Sent alert Record CPG1251_LauraS (Preliminary 1 Covid *PT*)Alert #74
612/8/22 7:55Updated Responsemistakes
712/8/22 7:50Updated Responseabcs, phq9_start
812/8/22 7:53Updated ResponseEdit report
9
10
11
1212/8/22 7:50
13
Sheet1
Cell Formulas
RangeFormula
A12A12=FILTER(A1:A8,(B1:B8="Updated Response")*(ISNUMBER(SEARCH("phq9_",C1:C8))))
 
Upvote 0
Book1
ABC
112/08/2022 11:16Manage/Design Edit report
212/08/2022 11:14Manage/Design abcs, phq9_start
312/08/2022 11:12Manage/Design Copy report
412/08/2022 07:51Updated Responseend3wpd2
512/08/2022 07:51Sent alert Record CPG1251_LauraS (Preliminary 1 Covid *PT*)Alert #74
612/08/2022 07:55Updated Responsemistakes
712/08/2022 07:50Updated Responseabcs, phq9_start
812/08/2022 07:53Updated ResponseEdit report
9
10
11result
1212/08/2022 07:50
Sheet2
Cell Formulas
RangeFormula
A12A12=LOOKUP(2,1/($B$1:$B$8=B8)/ISNUMBER(SEARCH("phq9_",$C$1:$C$8)),$A$1:$A$8)
 
Upvote 0
Solution
=INDEX($A$1:$A$8,AGGREGATE(14,6,ROW($A$1:$A$8)/--(--($B$1:$B$8="Updated Response")*IFERROR(SEARCH("phq9_",$C$1:$C$8),0)>0),ROW($A1)))
 

Attachments

  • wwwa.PNG
    wwwa.PNG
    56.7 KB · Views: 8
Upvote 0

Forum statistics

Threads
1,224,862
Messages
6,181,467
Members
453,045
Latest member
Abraxas_X

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