Use INDEX and MATCH together, for a powerful lookup formula. It’s similar to a VLOOKUP formula, but more flexible — the item that you’re looking for doesn’t have to be in the first column at the left. Watch the video to see how it works (there are written instructions too), and download the sample workbook to follow along.
Excel Lookup With Two Criteria
Watch this video to see how INDEX and MATCH work together — first with one criterion, and then with multiple criteria. Download the sample workbook to follow along, and the written instructions are below the video.
- 0:00 Introduction
- 0:26 Lookup with One Criterion
- 1:52 Test Each Criterion
- 2:22 Test With a Formula
- 3:26 Multiply the Results
- 4:03 INDEX / MATCH Formula
- 5:20 Check the Formula
- 5:57 Get the Sample File
Get Item Price with INDEX and MATCH
To see how INDEX and MATCH work together, we’ll start with an example that has only 1 criterion. Our price list has item names in column B, and we want to get the matching price from column C.
In the screen shot below, cell A7 has the name of the item that we need a price for – Sweater.
We can enter an INDEX and MATCH formula in cell C7, to get the price for that item:
=INDEX($C$2:$C$4,MATCH(A7,$B$2:$B$4,0))

How the INDEX and MATCH Formula Works
Here’s how the two functions work together:
- MATCH function gets the location of an item in a list
- INDEX function returns a value from a specific location in a list.
So, in our formula:
- the MATCH function looks for “Sweater” in the range B2:B4.
- The result is 1, because “Sweater” is item number 1, in that range of cells.
- the INDEX function looks in the range C2:C4
- The result is 10, from row 1 in that range
So, by combining INDEX and MATCH, you can find the row with “Sweater” and return the price from that row.
Find a Match for Multiple Criteria
In the first example, there was only one criterion, and the match was based on the Item name – Sweater. However, sometimes life, and Excel workbooks, are more complicated.
In the screen shot below, each item is listed 3 times in the pricing lookup table. We want to find the price for a large jacket.
To get the right price, you’ll need to use 2 criteria:
- the item name
- the size

Does it MATCH? True or False
Instead of a simple MATCH formula, we’ll use one that checks both the Item and Size columns.
To see how this formula will work, I’ll temporarily add columns to check the item and Size of each item — is the item a Jacket, and is the Size a Large?
Enter this formula in E2, and copy down to E10: =C2=$C$13
Enter this formula in F2, and copy down to F10: =D2=$D$13
- If the Item in column B is a Jacket, the result in column E is TRUE. If not, the result is FALSE
- If the Size in column C is Large, the result in column F is TRUE. If not, the result is FALSE
To see if both results are TRUE in each row, enter this formula in G2, and copy down to G10: =F2*G2
When you multiply the TRUE/FALSE values,
- If either value is FALSE (0), the result is zero
- If both values are TRUE, the result is 1
Only the 8th row in our list of items has a 1, because both values are TRUE in that row.
We can tell the MATCH function to look for a 1, and that will return the information that we need.

Use MATCH With Multiple Criteria
Instead of adding extra columns to the worksheet, we can use an array-entered INDEX and MATCH formula to do all the work.
Here is the formula that we’ll use to get the correct price, and the explanation is below:
=INDEX($D$2:$D$10,
MATCH(1,(A13=$B$2:$B$10) * (B13=$C$2:$C$10),0))
NOTE: This is an array-entered formula, so press Ctrl + Shift + Enter, instead of just pressing the Enter key.
How the Formula Works
In this INDEX and MATCH example,
- prices are in cells D2:D10, so that is the range that the INDEX function will use
- the item name is in cell A13
- the size is in cell B13.
The formula checks for the selected items in $B$2:$B$10, and sizes in $C$2:$C$10. The results are multiplied.
- (A13=$B$2:$B$10)*(B13=$C$2:$C$10)
The MATCH function looks for the 1 in the array of results.
- MATCH(1,(A13=$B$2:$B$10)*(B13=$C$2:$C$10),0)
If you select that part of the formula and press the F9 key, you can see the calculated results. In the screen shot below there are 9 results, and all are zero, except the 8th result, which is 1.

So, the INDEX function returns the price – 40 – from the 8th data row in column D (cell D9).

Get the Product Code
To find the product code for the selected item and size, you would change the formula to look in cells A2:A10, instead of the price column.
Put this formula in cell D13, and remember, this is an array-entered formula, so press Ctrl + Shift + Enter.
=INDEX($A$2:$A$10,
MATCH(1,(A13=$B$2:$B$10) * (B13=$C$2:$C$10),0))
In this example, the product code would be JK003, from cell A9.

Get the Workbook
To get the sample file with the Lookup Multiple Criteria examples, go to the Excel Lookup Multiple Criteria page on my Contextures site.
For more INDEX and MATCH tips and examples, visit the INDEX function and MATCH function page on the Contextures website. This is Example 4 in the sample file section of that page.
_____________
The data is as under
emp.no. gc date1 gc1 date1 gc2 date2
22101 4 1-1-99 9 1-1-04 11 1-1-07
2839 9 1-1-95 11 1-1-00 14 1-1-04
empno gc2 date2
2839 14 ??
what formula i can put at question marks so as to arrive at the date viz. 1-1-2004
regards govind
Dear Sir,
I am using a MS excel formula as below ;
=INDEX(table1,MATCH($B9,INDEX(table1,,1),0),MATCH(AJ$5,INDEX(table1,1,),0))
I get answer in return as per the search by this formula.
But in the case where there is 0 (zero) in the answer searched by this formula I want blank
(i.e. ” “) instead of 0 zero)
So what formula should I use.
Please suggest.
Thank you.
Rajan.
you can use IF Function for example =if(INDEX(table1,MATCH($B9,INDEX(table1,,1),0),MATCH(AJ$5,INDEX(table1,1,),0))=0,””,INDEX(table1,MATCH($B9,INDEX(table1,,1),0),MATCH(AJ$5,INDEX(table1,1,),0)) you use this formula you will get your answer..
Rajan…this is best handled by using a custom number format that hides zeros. For instance, apply the following custom format to the results cells:
#,##0; #,##0;
…or this for dollars:
$#,##0; $#,##0
But if your lookup table only contains strings – and not numbers – you can also do it by amending your formula by adding an empty string on to the end using this:
&””
…which turns any numbers to text. i.e. like this:
=INDEX(table1,MATCH($B9,INDEX(table1,,1),0),MATCH(AJ$5,INDEX(table1,1,),0)),0,””)& “”
i have two tables
what i need is to retrieve the matching credit loan number with the following criteria….where credit date should be greater then the debit date….and the corresponding amount should be retrieved….
table 1
LOAN DEBIT DATE AMOUNT
A 1-Apr-2012 10000
B 1-May-2012 30000
C 1-Jun-2012 50000
D 1-Jul-2012 2000
E 1-Mar-2012 40000
F 1-May-2012 80000
G 1-Oct-2012 15000
table 2
LOAN CREDIT DATE AMOUNT
B 1-Mar-2012 40000
C 1-May-2012 80000
D 1-Oct-2012 15000
B 1-Jul-2012 25000
A 1-May-2012 2000
R 1-Jun-2012 40000
S 1-Jul-2012 80000
i am not an excel expert just have basic ideas.i need your help as i need to calculate the below mentioned question…i dnt know how please help.
q:
One time payment plan(MIS) payment plan(FD)
Months Months
Rank Designation 66 120 36 60 84 120 & above
1 Marketing Member 6% 10% 7% 8% 9% 12%
2 Sr.Marketing Member 1.80% 1.80% 2.00% 2.00% 2.00% 2.00%
3 Sales Executive 1.00% 1.00% 1.30% 1.30% 1.30% 1.30% 1.30%
4 Sr.Sales Executive 0.90% 0.90% 1.20% 1.20% 1.20% 1.20%
5 Sales Manager 0.80% 0.80% 1.00% 1.00% 1.00% 1.00% 1.00%
6 Sr.Sales Manager 0.60% 0.60% 0.80% 0.80% 0.80% 0.80%
7 Sales Inspector 0.60% 0.60% 0.80% 0.80% 0.80% 0.80% 0.80%
8 Sr.Sales Inspector 0.60% 0.60% 0.80% 0.80% 0.80% 0.80%
9 Development Officer 0.60% 0.60% 0.80% 0.80% 0.80% 0.80%
10 Sr.Development Officer 0.60% 0.60% 0.80% 0.80% 0.80% 0.80%
11 Development Manger “0.50%” 0.50% 0.70% 0.70% 0.70% 0.70%
12 Sr.Development Manager 0.50% 0.50% 0.70% 0.70% 0.70% 0.70%
13Regional Marketing Officer 0.50% 0.50% 0.70% 0.70% 0.70% 0.70%
14Regional Marketing Manager 0.50% 0.50% 0.70% 0.70% 0.70% 0.70%
15Chief Marketing Manager 0.50% 0.50% 0.70% 0.70% 0.70% 0.70%
Question is that if the rank is Development Manager and the Product is MIS and Term is 66 months then what would be the income of the person on the basis of the declared percentage(under ” “).Now I need a way that If i put only the rank,term and amount then the earning should come automatically.Please help…
Hi, how can we we get multiple column headers returned in one row.
i.e:
17 18 19 20 21 22
Yes Yes
Yes No
if 19 and 21 row contains Yes, then which formula can return Column Name(i.e 19,21) in 22.
Please help, highly appreciated.