Excel INDEX MATCH with 3 criteria not working

mcva

New Member
Joined
Apr 20, 2020
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hello,
I need to apply a lookup with 3 criteria (criteria 1, criteria 2, criteria 3). I tried to use index and match as described in the following picture. However this is not working. In the first output line the value should be, 440, I´m getting 44203. What´s the best solution for this type of problem? Thank you.


exemplo.jpg
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
difficult with an image of formula

but use a grid lookup
criteria 1 and 2 using a &

=match(A2&b2,F2:F112&G2:G112,0)
why are the ranges for a2 and b2 in images different ??
here is an example i made a while back
grid Lookup - concate 2 columns and 1 row.xlsx
ABCDEFGHIJKLMNOPQRS
1BranchProduct1-Jan2-Jan3-Jan4-Jan5-Jan6-Jan7-Jan8-JanBranchProductDateINDEX MATCHSUMPRODUCT
2NP000018A32618242215NP000001C1/6/201616
3NP000018B21216141213
4NP000018C11
5NP000018D13
6NP000018E
7NP000018F1
8NP000018G12
9NP000001A156536226860
10NP000001B13161168
11NP000001C16
12NP000001D13
13NP000001E
14NP000001F561
15NP000019A93852
16NP000019B10139711
17NP000019C30
18NP000019D17
19NP000019E
20NP000019F
21NP000019G3
Sheet1
Cell Formulas
RangeFormula
Q2Q2=INDEX($C$2:$J$150, MATCH(M2&N2,A$2:$A$150&B$2:$B$150,0),MATCH(O2,$C$1:$J$1,0))
S2S2=SUMPRODUCT((Sheet1!$A$2:$A$21=M2)*(Sheet1!$B$2:$B$21=N2)*(Sheet1!$C$1:$J$1=O2)*(Sheet1!$C$2:$J$21))


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

if you have any issues with XL2BB, then the "About this Board" is the forum to ask questions about XL2BB
 
Upvote 1
Solution
difficult with an image of formula

but use a grid lookup
criteria 1 and 2 using a &

=match(A2&b2,F2:F112&G2:G112,0)
why are the ranges for a2 and b2 in images different ??
here is an example i made a while back
grid Lookup - concate 2 columns and 1 row.xlsx
ABCDEFGHIJKLMNOPQRS
1BranchProduct1-Jan2-Jan3-Jan4-Jan5-Jan6-Jan7-Jan8-JanBranchProductDateINDEX MATCHSUMPRODUCT
2NP000018A32618242215NP000001C1/6/201616
3NP000018B21216141213
4NP000018C11
5NP000018D13
6NP000018E
7NP000018F1
8NP000018G12
9NP000001A156536226860
10NP000001B13161168
11NP000001C16
12NP000001D13
13NP000001E
14NP000001F561
15NP000019A93852
16NP000019B10139711
17NP000019C30
18NP000019D17
19NP000019E
20NP000019F
21NP000019G3
Sheet1
Cell Formulas
RangeFormula
Q2Q2=INDEX($C$2:$J$150, MATCH(M2&N2,A$2:$A$150&B$2:$B$150,0),MATCH(O2,$C$1:$J$1,0))
S2S2=SUMPRODUCT((Sheet1!$A$2:$A$21=M2)*(Sheet1!$B$2:$B$21=N2)*(Sheet1!$C$1:$J$1=O2)*(Sheet1!$C$2:$J$21))


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

if you have any issues with XL2BB, then the "About this Board" is the forum to ask questions about XL2BB
Your solution works, thank you
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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