Home > Mobile >  When using Excel's match formula, how to control the selection of which row to match when there
When using Excel's match formula, how to control the selection of which row to match when there

Time:08-19

I'm trying to figure out how to deal with situations when using Excel's match formula where there is more than one match. In the below example, in cell C3 (formula spelled out in D3) we are matching ID = 1 in array A3:A8 and getting the match's row number back. In this example there are two matches of ID = 1 (cells A3 and A7) and XLS returns the first ID of 1 it finds, which is row 1 in the array A3:A8 (or cell A3). However I'd like the match formula to return the match that has the lowest associated "Value", which would be the ID of 1 that is in the 5th row of this array (cell A7) which has an associated Value of 9. Any ideas how to do this?

enter image description here

CodePudding user response:

Hello Please try this:

=MATCH(MINIFS(D4:D9,C4:C9,E4),D4:D9)

Result:

FF

  • Related