Excel: match two columns and output third … AND… there are multiple instances in each column

You can retrieve a two column match using the AGGREGATE function to force anything that does not match into an error and ignore the errors.

      INDEX AGGREGATE with two column MATCH

The formula in E6 is,

=IFERROR(INDEX(C$1:C$99,AGGREGATE(15,6,ROW($1:$99)/((A$1:A$99="red")*(B$1:B$99="boat")), ROW(1:1))), "")

You are actually using the SMALL sub-function of the AGGREGATE function so you can get the second, third, etc. successive matches by increasing the k paramter. I done this above by using ROW(1:1) which equals 1 but will increase to 2, 3, etc as the formula is filled down.

Leave a Comment