Index+Match+Mode Function with Multiple Criteria

xaikus506

New Member
Joined
Oct 29, 2022
Messages
46
Office Version
  1. 365
Platform
  1. Windows
Hello, I would like to seek your assistance, I would like to know how to perform/encode the formula for index+match+mode with multiple criteria.

this is what I did, however this is only good for 1 criteria only,

1667048651459.png


I also did something like this to solve my issue, but it yields inaccurate results,

1667048741581.png
 
Hi Flashbond,

I tested this function you made, it worked like a charm! thank you so much 🙂
I think my second suggestion in post#4 was correct. This works for me:
Excel Formula:
=INDEX(returnRange,MODE(IF((firstCriteriaRange=firstCriteria)*(secondCriteriaRange=secondCriteria),MATCH(returnRange,retunRange,0))))
Of course, this is an array function.
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I would like to add a question though, what if there are multiple modes (positions with same maximum count like for example Position A has =10, Position B has = 10 and Position C has =6), how do I can make it return Position A and B using a non-array function?
 
Upvote 0
With the untested theory that i suggested (if it works) you could try something like

=LET(u,UNIQUE(returnRange),r,FILTER(u,u<>""),c,COUNTIFS(firstCriteriaRange,firstCriteria,secondCriteriaRange,secondCriteria,returnRange,r),FILTER(r,c=MAX(c),""))
 
Upvote 0
With the untested theory that i suggested (if it works) you could try something like

=LET(u,UNIQUE(returnRange),r,FILTER(u,u<>""),c,COUNTIFS(firstCriteriaRange,firstCriteria,secondCriteriaRange,secondCriteria,returnRange,r),FILTER(r,c=MAX(c),""))
Hi jasonb75, My apologies for my late response I look on this formula and let you know if it works thanks!
 
Upvote 0
Hi jasonb75, My apologies for my late response I look on this formula and let you know if it works thanks!
Hi jasonb75, I tried to use the formula you provided, It works however, I have a concern that when it cannot find a mode. It returns only the unique values from the list even though they aren't resigned yet. is there a way to tweek it like if the max is 0, return blanks? Thank you for your assistance 🙂
 
Upvote 0
If I'm following you correctly, try
Excel Formula:
=LET(u,UNIQUE(returnRange),r,FILTER(u,u<>""),c,COUNTIFS(firstCriteriaRange,firstCriteria,secondCriteriaRange,secondCriteria,returnRange,r),FILTER(r,(c>1)*(c=MAX(c)),""))
This will ignore anything that doesn't have a count of more than 1. The part (c>1) near the end of the formula sets this threshold.
 
Upvote 0
Solution
If I'm following you correctly, try
Excel Formula:
=LET(u,UNIQUE(returnRange),r,FILTER(u,u<>""),c,COUNTIFS(firstCriteriaRange,firstCriteria,secondCriteriaRange,secondCriteria,returnRange,r),FILTER(r,(c>1)*(c=MAX(c)),""))
This will ignore anything that doesn't have a count of more than 1. The part (c>1) near the end of the formula sets this threshold.
Hi jasonb75, Thank for this it solves my problem it worked like a charm!
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

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