Index, match 2 criteria, pull data

Glasgowsmile

Active Member
Joined
Apr 14, 2018
Messages
280
Office Version
  1. 365
Platform
  1. Windows
Hello!

Trying to get an index match, or whatever formula I need to get a sheet to work.

Code currently pulls N/A.

I'm trying to match the Heading Title then subtitle and finally pull the data around it.

Code:
=INDEX(Data!C5:M40,MATCH(1,(Sheet1!E4=Data!C4:N4)*(Sheet1!A5=Data!A5:A31),0))

Here is the spreadsheet in case you need to reference it.

https://www.dropbox.com/s/ymsc2h5gty7xgmc/CodeExample.xlsx?dl=0
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi,

This should work for you:


Book1
ABCDEFG
4CODE1CODE2CODE3
5GO10605431817
6NB102210551638
7JE1721907782
8JT136318771460
9L21240720731
10JA1390179525
11GG129018531116
12ZV2021231539
13GG129018531116
14S52471200157
15Q24771271246
Sheet1
Cell Formulas
RangeFormula
E5=INDEX(Data!$C$5:$E$15,MATCH(Sheet1!$A5,Data!$A$5:$A$15,0),MATCH(Sheet1!E$4,Data!$C$4:$E$4,0))
 
Upvote 0
Thanks - that worked great, but I tried this same formula on another document and I'm getting an #N/A error. What kinds of things would cause that so I can try to trouble shoot it?

Here is the code I used for the new sheet - virtually an identical setup to this example sheet.

Code:
=INDEX(DlyRateCodes1!$D$27:$K$46,MATCH('Rate Checker'!H$3,DlyRateCodes1!$D$25:$K$25,0),MATCH('Rate Checker'!$A5,DlyRateCodes1!$B$27:$B$48,0))

Hi,

This should work for you:

ABCDEFG
4CODE1CODE2CODE3
5GO10605431817
6NB102210551638
7JE1721907782
8JT136318771460
9L21240720731
10JA1390179525
11GG129018531116
12ZV2021231539
13GG129018531116
14S52471200157
15Q24771271246

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
E5=INDEX(Data!$C$5:$E$15,MATCH(Sheet1!$A5,Data!$A$5:$A$15,0),MATCH(Sheet1!E$4,Data!$C$4:$E$4,0))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
I think you have applied in wrong order, you have done INDEX(Range,MATCH for Column,MATCH for Row), it should be INDEX(Range, MATCH for Row, MATCH for Column)
 
Upvote 0
Something I do want to mention.

The Cells that are being used to Match -- H$3 and $A5, those are not text cells, they have formulas in them. Would that cause an error?
 
Upvote 0
I think you have applied in wrong order, you have done INDEX(Range,MATCH for Column,MATCH for Row), it should be INDEX(Range, MATCH for Row, MATCH for Column)

Thanks, I've tried both ways and get N/A each time -- wondering if since the says are a forumla, pulling data from another sheet to that cell, if that's the issue with this formula? Is it not able to correctly see the reference data?
 
Upvote 0
Thanks, I've tried both ways and get N/A each time -- wondering if since the says are a forumla, pulling data from another sheet to that cell, if that's the issue with this formula? Is it not able to correctly see the reference data?

so... I typed the Data in the cell instead of pulling it from another sheet and the INDEX/Match worked perfectly but that creates a new problem sadly. How do I get it to look at the actual reference data in the cell and not the formula?
 
Upvote 0

Forum statistics

Threads
1,214,533
Messages
6,120,076
Members
448,943
Latest member
sharmarick

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