# Index Formula with Multiple Match Criteria

#### Melo

##### New Member
I am trying to create a formula that will return a record number (in column A on "Report" sheet) based on matching both a last name (C4) and date (E4) with a corresponding last name (column AE) and date (column B) on a second sheet ("Report"). This is what I have so far:

=INDEX(Report!\$A:\$AE,MATCH(C4&E4,Report!\$AE:\$AE&Report!\$B:\$B,0),1)

### 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
I am trying to create a formula that will return a record number (in column A on "Report" sheet) based on matching both a last name (C4) and date (E4) with a corresponding last name (column AE) and date (column B) on a second sheet ("Report"). This is what I have so far:

=INDEX(Report!\$A:\$AE,MATCH(C4&E4,Report!\$AE:\$AE&Report!\$B:\$B,0),1)

Return a record from where (which column) exactly?

Hi,

Try Sumproduct

=SUMPRODUCT(--(AE:AE=C4)*--(B:B=E4)*(A:A))

Jai

I want it to return a record number from column A on sheet "Report"

Find last cell with data - as formular

elaborates on the coercers like --- and *.

My excel doesnt seem to like sumproduct as

=SUMPRODUCT(--(AE:AE=C4),--(B:B=E4),(A:A))

So I have to use

=SUMPRODUCT(--(AE:AE=C4)*--(B:B=E4)*(A:A))

Maybe the European and US standards.

Jai

So the database that I downloaded my reference ("Report") sheet out of had all of the date entries as text. UGGGGG!!!! Your formula is working perfectly now. Thank you!! Wish that hadn't taken 4 hours to figure out.

Last edited:
What does this return?

=SUMPRODUCT(--(AE1:AE1000=C4)*--(B1:B1000=E4)*(A1:A1000))

Jai

I want it to return a record number from column A on sheet "Report"

Control+shift+enter, not just enter:

=MATCH(C4,IF(Report!\$B\$2:\$B\$500=E4,Report!\$AE\$2:\$AE\$500),0)

yields the record number.

Control+shift+enter, not just enter:

=INDEX(Report!\$A\$2:\$A\$500,MATCH(C4,IF(Report!\$B\$2:\$B\$500=E4,Report!\$AE\$2:\$AE\$500),0))

yields the record itself.

Replies
6
Views
268
Replies
0
Views
193
Replies
0
Views
200
Replies
2
Views
485
Replies
3
Views
682

1,196,306
Messages
6,014,566
Members
441,828
Latest member
cofracr

### 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.

### Which adblocker are you using?

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

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