*This tutorial demonstrates the key strengths of Excel's INDEX / MATCH function that make it superior to VLOOKUP. You will find a number of formula examples that will help you easily cope with many complex tasks when VLOOKUP fails.*

In a couple of recent articles I made a good effort to explain the basics of Excel VLOOKUP function to beginners and provide more complex VLOOKUP formula examples to power users. And now, I will try if not to talk you out of using VLOOKUP, then at least show you an alternative way to do a vertical lookup in Excel.

"What do I need that for?" you can ask me. Because VLOOKUP is not the only lookup formula available in Excel, and its numerous limitations might prevent you from getting the desired result in many situations. On the other hand, Excel's INDEX MATCH is more flexible and has certain features that make it superior to VLOOKUP in many respects.

## Excel's INDEX and MATCH functions - the basics

Since the aim of this tutorial is to demonstrate an alternative way to do a vlookup in Excel by using a combination of INDEX and MATCH functions, we won't dwell much on their syntax and uses. We will cover only the minimum necessary for understanding the general idea and then take an in-depth look at formula examples that reveal all the advantages of using Index / Match instead of Vlookup.

#### The INDEX function's syntax and usage

The Excel INDEX function returns a value in an array based on the row and column numbers you specify. The syntax of the INDEX function is straightforward:

Here is a very simple explanation of each parameter:

**array**- this is a range of cells that you want to return a value from.**row_num**- the row number in array from which you want to return a value. If omitted, the column_num is required.**column_num**- the column number in array from which you want to return a value. If omitted, row_num is required.

If both row_num and column_num parameters are used, the INDEX function returns the value in the cell at the intersection of the specified row and column.

And here is the simplest example of the INDEX formula:

`=INDEX(A1:C10,2,3)`

The formula searches in cells A1 through C10 and returns a value of the cell in the 2nd row and the 3rd column, i.e. cell C2.

Very easy, right? However, when working with real data you would hardly ever know which row and column you want, that is why you need the help of the MATCH function.

#### The MATCH function's syntax and usage

The Excel MATCH function searches for a lookup value in a range of cells, and returns the **relative position** of that value in the range.

For example, if the range B1:B3 contains the values "New-York", "Paris", "London", then the formula `=MATCH("London",B1:B3,0)`

returns the number 3, because "London" is the third entry in the range.

The syntax of the MATCH function is as follows:

**lookup_value**- this is the number or text you are looking for. This can be a value, a cell reference or logical value.**lookup_array**- a range of cells being searched.**match_type**- this parameter tells the MATCH function whether you want to return an exact match or the nearest match:- 1 or omitted - finds the largest value that is less than or equal to the lookup value. The values in the lookup array must be sorted in ascending order, i.e. from smallest to largest.
- 0 - finds the first value that is exactly equal to the lookup value. In the INDEX / MATCH combination, you almost always need the exact match, so the third argument of your MATCH function is "0".
- -1 - finds the smallest value that is greater than or equal to lookup_value. The values in the lookup array must be sorted in descending order, i.e. from largest to smallest.

For more information about the MATCH function, please see How to use MATCH function in Excel.

At first sight, the usefulness of the MATCH function may seem questionable. Who cares about the position of a value in a range? What we do want to know is the value itself.

Let me remind you that the relative position of the lookup value (i.e. a row or/and column number) is exactly what you need to supply to the row_num or/and column_num argument of the INDEX function. As you remember, the INDEX function can return the value at the juncture of a given row and column, but it cannot determine which exactly row and column you want.

## How to use INDEX MATCH function in Excel

Now that you know the basics of these two functions, I believe it has already started making sense how Excel's MATCH and INDEX work together.

The MATCH function determines the relative position of the lookup value in the specified range of cells. From there, the INDEX function takes that number, or numbers, and returns a value in the corresponding cell.

Still having difficulties to figure it out? Think about Excel INDEX / MATCH in this way:

*column to return a value from*, MATCH (

*lookup value*,

*column to look up against*, 0))

I believe it's even easier to understand from an example. Suppose you have a list of national capitals like this:

Let's find the population of some capital, say the capital of Japan, using the following Index Match formula:

`=INDEX($D$2:$D$10,MATCH("Japan",$B$2:$B$10,0))`

Now, let's analyze what each component of this formula actually does:

- The MATCH function searches for the lookup value "Japan" in column B, more precisely cells B2:B10, and returns the number 3, because "Japan" is the third in the list.
- The INDEX functions takes "3" in the second parameter (row_num), which indicates which row you want to return a value from, and turns into a simple
`=INDEX($D$2:$D$10,3)`

. Translated into plain English, the formula reads: search in cells D2 through D10 and return a value of the cell in the 3^{rd}row, i.e. cell D4, because we start counting from the second row.

And here's the result you get in Excel:

**Important!** The number of rows and columns in the INDEX array should match those in the row_num or/and column_num parameters of the MATCH functions, respectively. Otherwise, the formula will return incorrect result.

Wait, wait... why don't we simply use the following Vlookup formula? What's the point in wasting time trying to figure out the arcane twists of Excel's MATCH / INDEX?

`=VLOOKUP("Japan",$B$2:$D$2,3)`

In this case, no point at all : ) This simple example is for demonstration purposes only, so that you get a feel of how the Index and Match functions work together. Other examples that follow below will show you the real power of the INDEX MATCH liaison that easily copes with many complex scenarios when VLOOKUP stumbles.

## Why Excel's INDEX MATCH is better than VLOOKUP

When deciding which formula to use for vertical lookups, the majority of Excel gurus agree that INDEX / MATCH is far better than VLOOKUP. However, many Excel users still resort to utilizing VLOOKUP because it's a simpler function. This happens because very few people fully understand all the benefits of switching from Vlookup to Index Match, and without such understanding no one is willing to invest their time to learn a more complex formula.

Below, I will try to point out the key advantages of using MATCH / INDEX in Excel, and then you decide whether you'd rather stick with Vlookup or switch to Index Match.

#### 4 top benefits of using MATCH INDEX in Excel

**Right to left lookup.**As any educated user knows, Excel VLOOKUP cannot look to its left, meaning that your lookup value should always reside in the left-most column of the lookup range. INDEX MATCH can do a left lookup with ease! The following example demonstrates this feature in action - How to lookup values to left.**Insert or delete columns safely.**VLOOKUP formulas get broken or return incorrect results when a new column is deleted from or added to a lookup table. With VLOOKUP, any inserted or deleted column changes the results returned by your formulas because the VLOOKUP function's syntax requires specifying the entire table array and a certain number indicating which column you want to pull the data from.For example, if you have a table A1:C10 and want to return a value from column B, you will put "2" in the third parameter (col_index_num) of a VLOOKUP formula, say

`=VLOOKUP("lookup value", A1:C10, 2)`

. If at a later point, you insert a new column between A and B, you will have to change "2" to "3" in your formula, otherwise it would return a value from the newly inserted column.With INDEX MATCH, you can delete or insert new columns in your lookup table without distorting the results since you specify directly the column containing the value you want to get. And this is a really great benefit, especially when working with large datasets, since you are able to insert and remove columns without worrying about updating every associated vlookup formula.

**No limit for a lookup value's size.**When using the VLOOKUP function, remember that the total length of your lookup criteria should not exceed 255 characters, otherwise you will end up having the #VALUE! error. So, if your dataset contains long strings, INDEX MATCH is the only working solution.Suppose, you are using the following VLOOKUP formula that searches through cells B5 to D10 for the value in cell A2:

`=VLOOKUP(A2,B5:D10,3,FALSE)`

The formula won't work if the lookup value in cell A2 exceeds 255 symbols. Instead, you shall use the analogous INDEX / MATCH function:

`=INDEX(D5:D10, MATCH(TRUE, INDEX(B5:B10=A2, 0), 0))`

**Higher processing speed.**If your tables are relatively small, there will hardly be any significant difference in Excel's performance. But if your worksheets contain hundreds or thousands of rows, and consequently hundreds or thousands of formulas, MATCH INDEX will work much faster than VLOOKUP because Excel will have to process only the lookup and return columns rather than the entire table array.VLOOKUP's impact on Excel's performance may be especially noticeable if your workbook contains complex array formulas like VLOOKUP and SUM. The point is that checking each value in the array requires a separate call of the VLOOKUP function. So, the more values your array contains and the more array formulas you have in a workbook, the slower Excel performs.

On the other hand, with INDEX MATCH, Excel has to consider only the lookup and return columns, as the result it processes such formulas much faster.

## Excel INDEX & MATCH - formula examples

Now that you know the reasons to learn the MATCH INDEX function, let's get to the most interesting part and see how you can apply the theoretical knowledge in practice.

### How to lookup values to left with INDEX & MATCH

As stated in any VLOOKUP tutorial, this Excel function cannot look at its left. So, unless your lookup column is the left-most column in the lookup range, there's no chance that a vlookup formula will return the result you want.

Excel's INDEX MATCH function is more flexible and does not really care where the return column resides. As an example, we will use the table listing national capitals by population again. This time, let's write an INDEX MATCH formula that finds how the Russian capital, Moscow, ranks in terms of population.

As you can see in the screenshot below, the following formula works perfectly:

`=INDEX($A$2:$A$10,MATCH("Russia",$B$2:$B$10,0))`

Naturally, you can replace the "hard-coded" lookup value with a cell reference:

`=INDEX($A$2:$A$10,MATCH(F2,$B$2:$B$10,0))`

By now, you should not have any difficulties to understand how the formula works:

- First, you write a simple MATCH formula that finds the position of Russia:
`=MATCH("Russia",$B$2:$B$10,0))`

- Then, you determine the array parameter for your Index function, which is column A in our case (A2:A10).
- Finally, you assemble the two parts together and get this formula:
`=INDEX($A$2:$A$10,MATCH("Russia",$B$2:$B$10,0))`

**Tip.**It's a good idea to always use

**absolute cell references**in INDEX and MATCH formulas so that your lookup ranges won't get distorted when you copy the formula to other cells.

Download Lookup to left example.

### Calculations with INDEX MATCH in Excel (AVERAGE, MAX, MIN)

You can nest other Excel functions within the MATCH INDEX formula, say, to find the minimum or maximum value, or the value closest to the average in the range. Here are a few formula examples for the table used in the previous sample:

Function | Formula example | Description | Returned result |

Min | =INDEX($C$2:$C$10, MATCH(MIN($D$2:I$10), $D$2:D$10, 0)) | Finds the min value in column D and returns a value from column C in the same row. | Beijing |

Max | =INDEX($C$2:$C$10, MATCH(MAX($D$2:I$10), $D$2:D$10, 0)) | Finds the max value in column D and returns a value from column C in the same row. | Lima |

Average | =INDEX($C$2:$C$10, MATCH(AVERAGE($D$2:D$10), $D$2:D$10, 1)) | Calculates the average in range D2:D10, finds the value closest to the average, and returns a corresponding value from column C. | Moscow |

Download Calculations with Excel INDEX /MATCH example.

#### Things to keep in mind when using AVERAGE with INDEX / MATCH

When using the AVERAGE function in combination with INDEX MATCH, most often you would enter either "1" or "-1" in the third argument (match_type) of the MATCH function, unless you are certain that your lookup array contains a value exactly equal to the average. If latter, you can enter "0" for exact match.

If you set 1, the values in the lookup column must be sorted in ascending order, and the formula will return the largest value that is **less than** or equal to the average value.

If you set -1, the values in the lookup column must be sorted in descending order, and the smallest value that is **greater than** or equal to the average value will be returned.

In our example, values in column D are sorted in ascending order, so we use "1" as the match type, and our Average + Index Match formula returns "Moscow" since its population (11,5410,00) is the closest "less than" match to the average number (12,269,006).

If you are curious to know analogues VLOOKUP formulas, here you go: Calculations with VLOOKUP (AVERAGE, MAX, MIN).

### How to use INDEX MATCH to search by row and column values

This formula is an equivalent of the two-dimensional VLOOKUP that lets you find the value at the intersection of a certain row and column.

In this example, your Excel INDEX MATCH function is going to be very similar to other formulas we've already discussed in this tutorial, with the only difference. Guess what?

As you remember, the syntax of the INDEX function allows for both: `INDEX(array, row_num, [column_num])`

. And I congratulate those of you who have guessed right : )

To begin with, let's create the general formula to perform a matrix lookup. We just take the INDEX / MATCH formula you already know and add one more MATCH function to it, which will return the column number:

*lookup table*, MATCH (

*vertical lookup value*,

*column to look up against*, 0), MATCH (

*horizontal lookup value*,

*row to lookup against*, 0))

Please pay attention that you have to specify the **entire table** in the array argument of the INDEX function in case of two-way lookup.

And now, let us apply this formula template in practice. Below, you see a list of the most populated counties in the world. Suppose, you want to know the number of population in the USA in the year 2015:

Okay, let's start on the formula. Whenever I need to create a complex Excel formula with one or several nested functions, I always write each individual function first.

So, you start by writing two MATCH functions that will return the row and column numbers for your INDEX function.

**Vertical match**- you search through column B, more precisely in cells B2 to B11, for the value in cell H2 ("USA"), and the corresponding MATCH function is this:`=MATCH($H$2,$B$1:$B$11,0)`

This MATCH formula returns 4 because "USA" is the 4^{th}item in column B (including the column header).**Horizontal match**- you search for the value in cell H3 ("2015") in row 1, i.e. in cells A1 to E1:`=MATCH($H$3,$A$1:$E$1,0)`

This MATCH formula returns "5" because "2015" is the 5^{th}column.

Now, put the above formulas inside the INDEX function, and voila:

`=INDEX($A$1:$E$11, MATCH($H$2,$B$1:$B$11,0), MATCH($H$3,$A$1:$E$1,0))`

If you replace the MATCH functions with the returned numbers, the formula is much easier to understand: `=INDEX($A$1:$E$11, 4, 5, 0))`

Meaning, it returns a value at the intersection of the 4^{th} row and 5^{th} column in range A1:E11, which is the value in cell E4. Easy? Yep! : )

Download 2-way INDEX /MATCH example.

### Look up with multiple criteria using INDEX MATCH

In the Excel VLOOKUP tutorial, I demonstrated a formula example to do a vlookup with multiple criteria. However, a significant limitation of that approach was the necessity to add a helper column. The good news is that Excel's INDEX MATCH function can also look up values in 2 columns, at that no helper column is requited!

Suppose, you have a list of orders and you want to find the sum based on 2 criteria, "*Customer Name*" and "*Product*". A complicating factor is that one customer can buy multiple products and customer names are listed in a random order in the Lookup table:

The following INDEX MATCH array formula works a treat:

`=INDEX('Lookup table'!$A$2:$C$13, MATCH(1, (A2='Lookup table'!$A$2:$A$13) * (B2='Lookup table'!$B$2:$B$13) ,0), 3)`

This formula is more complex than any other we've discussed today, but powered with the knowledge of Excel MATCH INDEX you already have, I am sure you can cope with it.

The trickiest part is the MATCH function, so let's figure it out first:

`MATCH(1, (A2='Lookup table'!$A$2:$A$13),0) * (B2='Lookup table'!$B$2:$B$13), 0)`

What we have here is the following 3 arguments:

**Lookup_value**: 1**Lookup_array**: (A2='Lookup table'!$A$2:$A$13),0) * (B2='Lookup table'!$B$2:$B$13)**Match_type**: 0

The 1^{st} and 3^{rd} parameters are crystal clear - the function searches for "1", and returns the first found value.

Now, the main question is - why do we look up "1"? To get the answer, let's have a closer look at our lookup array.

What we do here is take the first value (A2) in the "Customer name" column in the main table and check it against all customer names in the lookup table (A2:A13). If the match is found, the equation returns TRUE, otherwise FALSE. Then we do the same for values in columns B ("Products").

To better understand what I am talking about, you can select the arrays in the formula bar, and press the F9 key to see what each of the selected parts evaluates to (please see Evaluating portions of an array formula for more details):

As you probably know, in Excel formulas, the logical value of TRUE equates to 1, and FALSE equates to 0. And because the asterisk (*) acts as the AND operator in array formulas, we get "1" only if the match is found in both columns, 0 otherwise. So, the result of this operation is an array of 1's and 0's, where "1" is the value that meets both of the specified conditions. If your lookup table does not have any duplicated rows, there will be just one "1" in the array. And because "1" is our lookup value, the MATCH function returns the relative position of that row as demonstrated in the following screenshot:

Also, please pay attention that you have to use the optional third parameter (column_num) of the INDEX function. This is because you specify the entire table in the first parameter (array), and you need to let the function know which column you want to return a value from. In our case it's column C ("Sum"), so we enter 3 in the third argument of the Index function.

And finally, since we need to check each cell in the array, our INDEX MATCH formula should be an array formula. The most obvious visual indication of an array formula is {curly braces} in which it is encapsulated in the formula bar. Just remember to press Ctrl+Shift+Enter to properly complete the formula after you've finished typing.

If everything is done correctly, you will get a result similar to what you see in the screenshot below:

Download INDEX /MATCH with multiple criteria example.

### Using INDEX / MATCH with IFERROR in Excel

As you have probably noticed (more than once : ) if you enter an invalid value, i.e. a value that does not exist in the lookup array, the INDEX / MATCH function produces #N/A or #VALUE error message. If you'd rather replace it will something more meaningful, you can wrap your INDEX / MATCH formula in the IFERROR function.

The syntax of the IFERROR function is very simple:

Where the value argument is the value checked for an error (the result of the INDEX MATCH formula in our case); and value_if_error is the value to return if the formula produces an error.

For example, you can enclose the formula from the previous example within the IFERROR function in this way:

`=IFERROR(INDEX($A$1:$E$11, MATCH($G$2,$B$1:$B$11,0), MATCH($G$3,$A$1:$E$1,0)),`

"No match is found. Please try again!")

And now, if someone inputs an invalid entry, the formula will produce the result you see in the screenshot below:

If you prefer to have a blank cell when an error is returned, you can just use double quotes ("") in IFERROR's second parameter, like this:

Download INDEX / MATCH with IFERROR example.

I hope at least one formula described in this tutorial proved to be helpful for you. If you are faced with some other lookup task for which you have not found a solution here, don't hesitate to drop me a comment and we will try to fathom it out.

Sir, Still I am waiting for your positive reply.

Binoy

Svetlana

I have a large spreadsheet that contains a lot of information about many locations.

Each location has a unique 4 digit index number and a name. The name may not be unique but may be used in different locations such as North Here, South Here, East Here or “The North here of Little Easterly”. Some people know the location by the number and some people know the location by simply, in this case, “Here”. A simple lookup table can be used in the first instance for the unique number but what code must I use so that by entering the name, “Here” in a field, the code placed in stacked fields (say 6, one above the other) will pull up all results where the name “Here” is contained in the text in the field and report the unique location number in the adjacent field:

A B C D E

Alpha 1234 Here East Here 2054

East Here 2054 Here 1223

Golf 4657 North Here 2212

Here 1223 The North Here of Little Westerly 1235

Juliet 7511 West Here 5589

North Here 2212

Siera 4651

The North Here

of Little Westerly 1235

West Here 5589

Thank you

Svetlana

I have a large spreadsheet that contains a lot of information about thousands of locations. Each location has a unique 4 digit index number and a name. The name may not be unique but may be used in different locations such as North Here, South Here, East Here or “The North here of Little Easterly”. Some people know the location by the number and some people know the location by simply, in this case, “Here”. A simple lookup table can be used in the first instance for the unique number but what code must I use so that by entering the name, “Here” in a field, the code placed in stacked fields (say 6, one above the other) will pull up all results where the name “Here” is contained in the text in the field and report the unique location number in the adjacent field:

A B C D E

Alpha 1234 Here East Here 2054

East Here 2054 Here 1223

Golf 4657 North Here 2212

Here 1223 The North Here of Little Westerly 1235

Juliet 7511 West Here 5589

North Here 2212

Siera 4651

The North Here

of Little Westerly 1235

West Here 5589

Thank you

Sorry the table collapsed!

……A………………………B………………………C………………………………D……………………………………………………E

Alpha………………1234………………Here……………East Here…………………………………………2054

East Here……2054…………………………………….Here…………………………………………………….1223

Golf…………………4657…………………………………….North Here………………………………………2212

Here…………………1223…………………………………….The North Here of Little Westerly…1235

Juliet……………7511…………………………………….West Here…………………………………………5589

North Here…2212

Siera………………4651

The North Here of Little Westerly……….1235

West Here…………………………………………..5589

Thank you

Hi Svetlana,

I'm dealing with a software that uses excel functionnalities, but can't support array functions. Do you know an alternate way of doing what an array formula does?

Thanks,

Félix

Hi Svetlana,

Can you kindly show us how we use this function between two worksheet but the excel book is same.I have tired it but i did not completely successful.

could you please help me out on this scenario.

SCENARIO

IF cell D3 AND range F3:AJ3 ISBLANK(), THEN C3 =""

IF cell D3 OR range F3:AJ3 is NOT BLANK , THEN MATCH values of cell D3 with Range F2:AJ2, whichever is MAX should show in cell C3.

=IF(ISNA(OR(COUNTA(F3:AJ3)=0,(MAX(LOOKUP(2,1/(F3:AJ3""),$F$2:$AJ$2)<D3)))),IF(D3="","",D3),LOOKUP(2,1/(F3:AJ3""),$F$2:$AJ$2))

By the way, I did some experiments and even if you pick exact match (0), it is still case insensitive when you try to match.

STREET is the same as Street.

(Now if I could get a "fuzzy" match so that Road would match RD, wow!)

To be clearer in my last comment, "STREET" is the same as "Street", but is not the same as "Street.". (In my case, comparing addresses, " Lake St." is not the same as "LAKE ST" without the abbreviating period.)

Hi

Anyone can help me to change this vlookup function to index mach?

=IFERROR(VLOOKUP("*"&G:G&"*",'ADV. & LOAN'!B:D,2,FALSE),"")

Hi

I have a file with 2 tabs, the first one has the customers name and the quantity that they ordered by style and on the second tab I also have the customer name and the style that they forecasted, I want to match the customer name and the style of the first tab with the second tab and return the value of the cell with the forecast quantity. I'm using the below formula, but it is not working

=IFERROR(INDEX(Sheet2!$1:$65536,MATCH($A4:$B4,Sheet2!$C:$D,0),MATCH(D$3,Sheet2!$1:$1,0),1),0)

Hi

I have downloaded Microsoft Templates file called "Sales invoice tracker" which has 4 key tabs which enables me to enter Customer details, Invoice details, Invoice summary and has a Invoice template tab. The file works great for recording all client information, client sales and creates the invoice via a dropdown list named (rngInvoice in the formula below) and referenced by the chosen job number in the "invoice" template. The formula has work fine until the ROW(1:1)) reaches ROW(13:13)) down the invoice page, i have reviewed the formula and for the life of me i cannot understand how this part of ROW works

=IFERROR(INDEX(InvoiceDetails,SMALL(IF(InvoiceDetails[Invoice '#]=rngInvoice,ROW(InvoiceDetails)-ROW(InvoiceDetails[#Headers])), ROW(1:1)), MATCH($B$13, InvoiceDetails[#Headers], 0)),"")

I have recreated a similar document but i am struggling with capturing and transferring data of multiple columns and rows via a single Job number column

All i would like to do is select a Job number on the dropdown list on the "invoice" template and have the data from the "invoice details" with multiple columns and rows to be copied into multiple columns and rows on the invoice

Please help

Hello,

I'm wondering if anyone can help me.

I am trying to create an organiser for my other half for university. Column C10,313 contains the date with column D10,313 Containing work set and a few other columns ToDo, Exams, Notes etc.

I am trying to create a formula with INDEX MATCH to create a new table with a column for 'Work to be completed' and the date set sequentially so when the organiser is being used you don't have to use any filtering functions to search the organiser. I want to keep the interface as simple as possible so you just have to fill in the 'work set' next to the date and it auto populates the concise list of 'Work to be completed' with corresponding date...

Any one know how I can go about this? It would be much appreciated.

Cheers,

Lewis

I am new to the Vlookup function, I feel I have a good grasp of it but one of my basic lookups is not working correctly. Ifyou look at test sheet, cell c24. The value is not returning correctly, there seems to be some math occurning and I cant figure out where it is. Any assistance?

C24 - =IFERROR(VLOOKUP(A24,Sheet1!A2:B23,2),0)

I was trying to post the xls but don't see an attachment option.

Hi every one.

Whats the simple way to do this

* If the DATE entered in "X" sheet goes to same date cell i.e if entered 10th then its goes to 10th Row of "Y"sheet".

Thanking you in advance for your kind support

Hi Svetlana! I have a spreadsheet with NFL stats and player rankings for all teams. My quarterback rankings are on Sheet 1 and wide receivers on Sheet 2.

I am trying to add the ranking of a quarter back with the ranking of a wide receiver for the same team to return a value for the wide receiver.

Example: wide receiver Joe Smith plays for team X and is ranked #5, his quarter back John Doe is ranked 6 = Joe Smith's value of 11.

Here is one formula that I've tried unsuccessfully so far : =IF(MATCH(C2:C51,Sheet2!C2:C39,0),A2:A51+Sheet2!A2:A39). Thank you for any assistance provided.

HELLO

i have a master list of items and New items codes . and another list of secondary list of items which have old codes .

I need to find out the common item description and replace the old item codes with the new codes.

thanks

Thanks a lot to post a very useful topic which can minimize our work at a great extent.

Hi. An excellent article on the use of INDEX MATCH, thank you. I have added the error handler (IFERROR) but previously with VLOOKUP I could also check to see if the resulting value was blank, and leave it blank in the cell. The data type in my cell is DATE, and if the answer is 0, it formats this as a date which is a pain.

My old formula is: =IFERROR(IF(ISBLANK(VLOOKUP(A1,Endorsements!A2:L33,5,FALSE)),"",VLOOKUP(A1,Endorsements!A2:L33,5,FALSE)),"")

I now have =IFERROR(INDEX(Endorsements!$E:$E,MATCH(A1,Endorsements!$A:$A,0)),"") which works great unless the item found is a 0, in which case the cell then shows 00 Jan 00.

Hope you can assist, this has been baffling me for many hours!

Thank you

Hello Svetlana

I am started to use Index Match function and I tried your article/suggestion very useful.

I have now looking at using Index Match with multiple criteria and I followed the example. I have noted that in this case one of the advantages wrt vlookup value use is lost, basically I can not longer insert or delete column in the lookup table. Can you please confirm that? is there 1 alternative can be use that overrides this problem

Thanks

S

How would you resolve this in order to get the first column value:

=INDEX(O3:O12^MATCH(B25^IF(((B25=R3:R12))^0^1)^0))

Input Value: B25: 8748

0 NA NA 9000 9999

1 NA NA 0 999

2 NA NA 1000 1499

3 NA NA 1500 1799

4 NA NA 2000 3999

5 NA NA 4000 4999

6 NA NA 5000 5199

7 NA NA 5200 5999

8 NA NA 6000 6799

9 NA NA 7000 8999

=INDEX(O3:O12^MATCH(B25^IF(IF(--(B25=R3:R12)^0^1)^0^1)^0))

I've tried and am still failing.

Hello Svetlana,

I wanna use index match formula to grab the first matching value"1" in every row and seperate it from the rest of the data. However most of the formula solutions return a report fromat however I wanna keep the same table design but just have it in two copies so that I can create a pivot afterwards.

I formed an example below. Thanks so much in advance.

2004/1 2004/2 2004/3 2004/4 2004/5 2004/6

Product 1 1 1 1

Product 2 1 1 1

Product 3 1

Product 4 1 1 1

Product 5 1 1 1

Product 6 1 1 1

Hi Fellows,

I was wondering whether someone can Help.

Is there a way to use the Index function to do the following.

Check for a Match (let's from A2 in column E) and if no match is found look for a match (let's say from B2 in I) and output the value from the column?

Thank you in advance for the cooperation.

Regards,

Slavcho

I've seen your article and I'm impressed on your. Where is my question:

In the population table I've to find out the name of the country having highest population.

Please help me out how to do that without macro or VBA

Hi, i need an help on index match function! i have a set of data for which i want to use index match function. My problem is i have lookup value but my return value also there in same column in the lookup value. how to return the below value.for example :-

Sam

age41

Ram

age32

height 6"

Mary

Age7

So i have all the name but i need the below value from the name which i have already done using index match function but i cant. Can u pls help me out.

For I am no expert, and have to translate all formulas (No, I dont work with a English version of office) some of the listed may be inacurate/wrong.

But i am pretty sure that:

- under "Why Excel's INDEX MATCH is better than VLOOKUP", 3.

=INDEX(D5:D10, MATCH(TRUE, INDEX(B5:B10=A2, 0), 0))

should be more like

=INDEX(D5:D10, MATCH(A2, B5:B10, 0))

- under "Calculations with INDEX MATCH in Excel (AVERAGE, MAX, MIN)", first table

Beijing has MAX population, and Lima MIN population, table states just the other way.

- under "How to use INDEX MATCH to search by row and column values", right above second graphic

=INDEX($A$1:$E$11, 4, 5, 0))

should be

=INDEX($A$1:$E$11, 4, 5)

If you copy&paste and then replace subfunctions with values, make sure you get the whole subfuncttion...or does the 0 do something I dont get? (despite the second closing bracelet)

- Look up with multiple criteria using INDEX MATCH, first graphic

just a minor thing: Why no row numbers? Really would help. :)

I only red on 'till (and including) "Look up with multiple criteria using INDEX MATCH" for I didn't need the following for solving my problem.

Pls, pls, pls proofread your articles before releasing. I understand that's a pain in the neck, but honestly, If I wouldn't know something about excel in the first place, I would have quit this article with a "fuckoff author" thought by the first non working formula. I came here to find a solution for my problem/learn something new. And if you, the "teacher", give me an example and that doesn't work, what am I supposed to do? Even I took a few minutes to realise that this is not just a new feature but an error, for I generally trust the internet.

Greetings

The Cook

PS: I hope these are mistakes. Or I just made an donkey out of myself.

PPS: "...for I generally trust the internet." even Abraham Lincoln knew: "Do not trust every (quote) at the internet." Wise bloke he is, isn't he?

Summary: A few errors and one cosmetic sugestion I found in this article.

The Cook is back: Just a comment for the friendly fellow who will write a comment about how someone else allready wrote a comment about this "mistakes": Here is a penny for your thoughts.

If that's true, just correct it allready. I only checked the first few comments, and realized most of them are questions for szenarios they have. And there are more comments that article. Writing my two comments was faster for me than checking the comments, for I read the article anyways 'till a certain point.

If that is not true, and I am indeed the first to point out mistakes:

I totaly checked all other comments, and couldn't find any pointing out mistakes. So i sacrificed some of *my precioussss* time to fulfill the heroic deed of doing so.

And I am no mother-toungish-english...er? so keep all tiping mitstakessd you find. :)

Summary: Some gibberish, some justifications, no real information.

Read for pleasure. Or don't.

Hello Svetlana,

If in above table of country population; one country is e.g. Italy is 5 times written together with other countries, then how to get minimum population of Italy from such tables???

Thanks for your kind guidance.

Hi,

Is it possible to do the index match function with an isblank formula?

The index match formula works great, but returns a '0' when the cell is blank, I would rather it returned a blank cell.

Many thanks

Emma

Hello, Emma,

Here's a sample formula that may work for your task:

=IF(ISBLANK(INDEX($D$2:$D$10,MATCH("Japan",$B$2:$B$10,0))), "", INDEX($D$2:$D$10,MATCH("Japan",$B$2:$B$10,0)))

Hi Svetlana,

I am trying to apply below formula to know the date of particular event corresponding to the person listed in column B, but it resulting as #REF!.

INDEX('Bill Entry'!$K:$K,MATCH(sheet5!$B6,'Bill Entry'!$B:$B,0),MATCH(sheet5!D$3,'Bill Entry'!$H:$H,0))

also used the following, which shows #VALUE!

INDEX('Bill Entry'!$K:$K,MATCH(sheet5!$B7&sheet5!D$3,'Bill Entry'!$B:$B&'Bill Entry'!$H:$H,0))

Pl. resolve it

Amod Ranjan

Hi, I'm trying to find a formula that would help me solve the following problem:

Code Country LE#

123 US 4026

123 UK 4026

123 US 3026

435 CN 1419

435 CN 1398

I need to find a formula that can return lowest LE# so if I look up 123 & US it should return with the lowest LE# which is 3026

Thanks.

Hello, David,

Please try this array formula:

{=MIN(IF((A2:A6=123) * (B2:B6="US"), C2:C6))}

Make sure you press CTRL + SHIFT + ENTER after entering it.

Thank you!

Not working for a situation like this

Lookup value :SSJQFIDPK

From array

MVKLALQPRDSVARIAREHDINDNLLFKWLRIWLIKGRISRRLPLTNSSGIGVELLPVEMTLDERPYPVFTRGNYEDQ

MLTLEVIRKINDWPSNRVHELLPWNLSAVK

MTTLHYYLKEALLNIIENRRQNFAFLVFLSLSFIGIIITDSLIYSVSLKAEEELKVHSDKVIFVKLYRPKTVGYITEKFITVSKVLSFSKNAFLYVSDTPFSGELFSVSGIDKLGLNTEYSGDLNDKYNGNVAIVNESSPFFSKKQIFINGVPFKIIGVRLNSKTDFLDSLGLKANQSDEHIFIPLETMFKMKLDNRVNAVKIFLDNIVTKRDINNVKRVLYDNDIRKFDIVTSLNAKEAVDRVLERFSLLTNSVYVILTLSASVTCFILSKRSFYSRRVELSLKIIHGTEKKEITVLIIIESLIMLSVCLFISLIHAGVIMHIIKYFLDVTISIRTTMITISLANVLLVFIFANIIFSRLFFSINPVNAIKGKIE

MRHILYSFLAINAYLFSTQTLAKDCIIDNFFQKSIQFNSYSLDIEELDINKHNNIKTMLPDINIGLGQYINNNQWFSSITDSHFYLSLSYNLLSAYEAKMQNNKLDIANYLKYIEMLSERNNYIINLFSEIINYKIKKSHLMLMFERYRKLNKEYEIAKRKMSIGLISVLDVEMIYNILQKIRFDIDVLEEEESLLSDKISREYHVPESAIPDITYHKLKECKTADFYTLLAENKKLKIKAADIDNDIRKLSEIPSFYLSFGLTPKQGGALGNMSLRKMDYSASLGISFPLMGLFSSSVNQKEKIISMSRTRNESLKENIKLDLLEKEIRQKIDRLEKNLAMMKNELTLKKRKVEYINYRLKNGQDDVISYLSSVENLHETENEFQKIGYEIEYYSLYHYFLLQHISNTGEM

MIEGNVVTVERKLFSVLNHEYTAKKDIVAMKRNMEEKKLARLKGVKTHSTSMFSKGLISRESLHDIDEKISNTELTIMGLDIESKNLEQLLKLSSPFLHTPFIIRNIFVTNEQYVNAGDDIMSVELLDNFYIDVKFDPVSITGNIRDKRIRYRSLVNSLMGAATVVKNIRASGESTQGEDTSGLRSITLLIDGDRNELSNLLDTAFEIIIDD

MIRVKIHKKPIENRTILNNSTIEIKEGSFNIITGPSGVGKTSLLNIIGLLDNAFVGEYEFFGKKVEIKDNSITTYIRRKYFGFIFQDSLINVKQNVLRNILCSVDSQNIIAARERINDILVSVGLSNINNNVSFLSGGEKQRLALARALIKKPSILLADEPTASLDIKNKKLVMNILSEYNNQGGTVVMVTHDLELIDENMTLIQLLNT

MKFTIVLLYFFAYYLAARKRRVSLFFTILLYSIIFSGMYFSSGFLEYYGSSNLYLSFGLLCYNMITLVIYGFLSSYGVLGACLHALLLTSLSAFGMFIPLNPLIVLYYDFPDILPRTDIPVLNLLILNLIPAVTFSLKISFFLRSLMLLLFPLIWKTPVNITHPPLNIVIVQVGLYFKKVGVRGNFYTDLNEFVRNKKVDLVILSENVFFGYKNDYIKERTKHLLKQLKDNRFHYKYGILMNLYGYQDINNVVSAFWHKEEFLLHQKSKLIPFFEKKSFYNSPEPSTSPFLYYKKKYNEQDILDFNNIKMSIHICYEGLFPEGESRRKDISIVQSDYSWLSDNHKYDNTLINGSILSKFSVSPNTPLINIQNYGGTVLIDKNWKIDMDLFNRSKTEPFLFTQI

MHSENIAAYIGLDVHKETLAVAIAAPERLGEVRYYGTINNEAQAVRRLFQKLQGLYGNILSCYEAGPCGFGLYHQLTAMNIKCQVIAPSRIPKSPTDRIKNDHRDAISLARLLRAGELTPVWIPDLTHEAMRDLIRARAAAKRDSRVARQRILSMLLRTDKRYAGKHWTGKHRTWLANQSFSQPSQQIAFQHYCQSLEQIEDRILQLDQKISRLLPEWSLCNLVCQLQALKGVGQLIAITLVAELGDFSRFSNPKQLMAFLGLVPGEYSSGNSIRPRGITKVGNSELRRLLYEAAWSYRTPAKVGAWLIYYRPDSVTQYSKDIAWKAQQRLCSRYRSLTAKGKNHK

Hello Nazrul,

It looks like this sequence of characters is not present in the array.

Hi,

I want formula for its like a inventory style, I have received same item different date and different price than I want issue same price what I was received

Example:

Received:

Date Description UOM Qty Rate

01/12/2015 Boat Nail 4" Kgs 200 10

Issue Or Sale

Date Description UOM Qty Rate

01/12/2015 Boat Nail 4" Kgs 20 10

Issue Sheet Date,Description Qty, rate Placed placed automatically compare to received sheet Date,Description and Qty

Hello,

Merge Tables Wizard add-in can help you with the task. Please find more information about it on this page:

https://www.ablebits.com/excel-lookup-tables/index.php

Hello,

I came here to look for advice on a task in Excel that could be very simple, but I am not an Excel expert. I have two columns that contain over 1,000 values in each. 90% of the values are the same in each column. I simply to look for the values that are different in each of the columns. I tried the Vlookup and I have not had any luck. Is this something the Index Match could do?

Thanks in advance for your help.

Hello, Castoro,

You can try our Duplicate Remover to search for unique values:

https://www.ablebits.com/excel-remove-duplicates/index.php

If you prefer using a formula, you can add a helper column with this one:

=IF(ISERROR(INDEX(A2:A10, MATCH(A2, A3:A10, 0))), TRUE, FALSE)

Here the values are in A2:A10.

Hello,

I have a 93k line data set, in which I've utilized the annoying conditional formatting tool for duplicate lines. I am attempting to group all duplicates and remove conditional formatting, however, it is no easy feat. With such a large data set it causes excel to crash during filtering.

I have attempted using lookups, match, index/match functions to no avail. Each duplicate line is not an exact duplicate because of the format (i.e. OPI or opi). Some are capitalized and may have additional letters and/or symbols.

Is there a formula that can be used to locate and group the duplicates without being exact matches from so much data?

Hello,

Please try the Duplicate Remover add-in for your task:

https://www.ablebits.com/excel-remove-duplicates/index.php

Greetings,

I'm stuck with an odd ball for days. The Cell that contains the Value I want exceeds 255 characters/symbols (not the value I'm looking for).

Formula I used trying to capture the row containing '9F0702':

MATCH("*9F0702*", A2:A10, 0)

Lets assume it's contained within A5

Data in A5 (321 characters):

7081975A0851843600000810395F24031908315F25031410015F280207845F3401028C279F02069F03069F1A0295055F2A029A039C019F37049F35019F45029F4C089F34039F21039F7C148D0C910A8A0295059F37049F4C088E14000000000000000042014403410342031E031F039F0702FF009F080200029F0D05BC50BC08009F0E0500000000009F0F05BC70BC98009F4A01829F420207849000

I Get: N/A

How can I get my formula to work?

The tutorial explains what to do when the value you are looking for exceeds 255 but not when the Cell Value itself exceeds it.

Please please help me out.

Hello,

You can try the following workaround:

=MATCH("*9F0702*",LEFT(A2:A10,255),0)

Hi,this was helpful for a beginner with Index like me. I would like to know how to find out multiple matches if there are multiple entries of the lookup value.To be clear let take an example : Column A has all the products and column B has the customer name. There are multiple products a customer has purchased. Now if i would like to know all the products a single customer has purchased, how would i go about it?

thanks

i have a value in column A which has 4 options in column d

I am using the index/match to produce a table of the 4 options (column d). I can only get the first option to work. how do i get the next 3 rows to show up in my table for the item in column A

a c d

1 0.75 3450

1765

1150

850

=IF(INDEX($D81:D$237,(MATCH($S$69,$B$81:$B$237,0)))0,INDEX(D$81:D$237,(MATCH($S69,$B81:$B$237,0))),"")

Hello, Harvey,

To help you better, we need a sample table with your data in Excel. You can email it to support@ablebits.com. Please add the link to this article and your comment number.

This worked great, and used it to match 3 values before giving me a result. Thanks!!

Sorry please ignore my previous quesiton the alignment didn come as i expected when i wrote the question. Please see my updated quesiton

Sl Item Category

1 Cabbage Veg

2 Carrot Veg/Fruit

3 Banana Fruit

4 Carrot Veg

So if i need an out of Veg and Fruit then i need to display Carrot in Veg and Veg/Fruit category.? can someone help me?

how can i arrange students grades to get highest marks and the student who has scored the marks,,,,,,as well using the same formular to get lowest marks and the student who has scored lowest marks

please help

how to formulate B1 = count "X" <=5

if A1 to A20 = X , B1 to B20 = 4 in sheet 1 &

if A1 = X in sheet 2

Hi Svetlana,

Thanks for the article, it explained things very well for me.

I have a slightly more complex problem I'm trying to solve (very complex for me, but maybe not too hard for someone more experienced).

I have a number of columns representing production within a particular hour of the day. From these I want to formulate a line graph displaying production over time. However there are a lot of gaps in the data as there was no production in that hour. A graph that does not take these gaps into account is stretched out.

I want to make a graph that does not include the gaps in the data.

From my research it appears that I need to create a new column which will pull the data into it that I want, using a combination of If + Index/Match + Small + Row.

I can't afford to individually select the cells that have data as I want the graph to dynamically select the required data and the data-set will end up being very large.

I will email an example document to support@ablebits.com.

I tried to leave a comment but I can't see it, so I'll re-post. Please ignore this if the original did come through.

I have some columns of production data from which I want to create a line graph. There are gaps in the data as there was no production during that particular time. I want to ignore the gaps, as they are irrelevant, and only graph the days when there was production.

It appears that I need to use a combination of Index/Match + If + Small + Row to place the data points in a new column and then have the graph refer to the new column which only includes cells that have a value in an unbroken list.

Thanks

I've sent an example document to 'support@ablebits.com'.

I try to find and return value from pivot table to another excel list using formula "=IFERROR(VLOOKUP($A3,PIVOT!$A$4:$RX$361,MATCH(BOM!G$1,PIVOT!$A$4:$SC$4,0),0),)"

but it's returning me value "0" instead of value that supposed to be founded in PIVOT.

Can someone assist ne with creating or amending above formula.

hello,

i am facing in some problem please give me a solution

how to find out exact value

like example: wihch is the highest value in "post" in texas

(city, state), (post, texas)

state - texas,in texas 3 city's for example

city - post - 12.53%

north post - 11.53%

south post - 12.54%

(city, state), (post, california)

post - 15.40%

My column A is DATE, column B has letters A-H which can repeat and varies with the dates, columns C and D have integers. I am looking for a formula to be in a cell in column E that can give me the value from either C/D if a cell value in column F (can be letters from A-H) matches with the letter in column B and the date is the MOST RECENT DATE. Thanks to everyone who can help me.

I have a spreadsheet for taxes. On one sheet there is a list of per diem allowances for different cities and counties throughout the US. Some cities have different rates depending on the time of year. What I'd like to do is this.

Look up the county specified in column F on sheet 1 in column D on 2015 Per diem Rates. Now if there are different rates at different times of year I need it to look at the date in Column a on 2015 and see what date range it falls between on 2015 Per diem Rates and then return the value in the corresponding row in column G.

I hope I haven't lost you! I know it has to be possible but I'm

I hope someone can point me in the right direction here. Here's my problem.

I have a spreadsheet with extension number, and I want to match that extension number to a name on the list. The issue is sometimes the name will change but the extension number is reused, but I want to keep historical data. Here's the example:

User1 had extension 2500

A vlookup can quickly return User1 as the name, if it's the only occurrence.

on 3/1/2016, User4 takes over and uses extension 2500.

Now, I want to show all rows prior to 3/1/2016 with User1 name, and all rows after 3/1/2016 with User4 name.

I'm not sure how to represent this...

So I want to match both criteria, Date and Extension to come up with the name.

Here's what I want to accomplish:

Date Ext Name(vlookup)

2/29/2016 2500 User 1

3/1/2016 2500 User 4

3/2/2016 8433 User 2

3/2/2016 8434 User 3

3/3/2016 2500 User 4

My Lookup table is like this:

Date Ext Name

1/1/2016 2500 User1

1/1/2016 8433 User2

1/1/2016 8434 User3

3/1/2016 8432 User4 (This extension is now repeated)

Thank you in advance for your help!

ADP

Hi,

I'm trying to get values of the sales, costs, and profit for each item number using Index Match function, but I want the function to loop through values in column A that contains the item numbers, until no more records. Below is sample data.

Column A Column W Column X Column Z

1234 10.00 20.00 30.00

4567 20.00 30.00 40.00

How do I do this?

Thanks

Javed

Hi I'm still unclear on where "1" came from in the chapter of "Look up with multiple criteria using INDEX MATCH"

Is there any hidden formula to return "1" value ?

Hi Jacob,

I guess you are asking about this part of the formula:

MATCH(

1, (A2='Lookup table'!$A$2:$A$13),0) * (B2='Lookup table'!$B$2:$B$13)...There is no hidden formula, 1 is "hardcoded" in the Match formula as the lookup value. The formula checks two columns in the main table, column A ("Customer name") and columns B ("Products"), for matches in the lookup table. If the match is found, the above equation returns "1", otherwise "0". And that is why we use "1" as the lookup value, we just want the MATCH function to return an item's position only when both criteria are true.

sorry for bothering you. as i'm beginner,i understand your intention why you put hardcoded "1". Without any formula like "if", excel current sytx enables user could compare and return either "1" or "0" ?

Hi Jacob,

Generally, yes. More precisely, the functions return the logical values of TRUE that equates to 1, and FALSE that equates to 0.

In fact, I started to write a more detailed explanation for you, and ended up re-writing that part of my blog post :) Please check out the revised Look up with multiple criteria example. Hopefully the current explanation makes more sense. And thank you for your question!

Thanks for your kindness :)

I have a formula which works well but I need it to go further and return a blank result if the source cell in the other sheet is also blank. Otherwise the formula returns the value "0-Jan-00", since the cell format is suppose to return the date from another tab. The current formula is:

=IF((ISNA(MATCH($E4,Sheet!$H$9:$ACW$9,0)+4)),"",INDEX(Sheet!$H$10:$ACW$13,4,MATCH($E4,Sheet!$H$9:$ACW$9,0)+4))

Thank you

hi

ok I'm using open office which does not have IFERROR.i have two lists of names one long(50 names)one short (10) each list also has a cell with a number in it.

the number MAY change in the short list ,so I use vlookup to find the name from the long to the short and change the value in the cell,But if the name is not found its gives an error and I want the value in the cell(long list) to just stay as It is ,if the name is not found in the short list.

I think index match might work but not a clue how to do it.

So how do I do that please..

john

I am using the following formula and it is working fine. It is pulling dates. When I try to do a sort oldest to newest the dates change. Can you tell me if there is something in my formula that causes this?

There is an error on the MIN/MAX example table. The "Results" are listed incorrectly. You seem to have switched the MIN and MAX example answers.

Hi, I have referred to your INDEX /MATCH with multiple criteria example.

and have a one question on how do we GET the next result if there's a match or duplicate of those 2 criteria (1st being Dan Brown, 2nd being Apples)

Dan Brown Apples $271

Dan Brown Apples $300

The first result will be $271 if formula is used correctly.

How do I get the 2nd result? which is $300

Very much appreciated.Thanks.

I need help with a formula.

In column B (Invoice Source A)I have a list of invoice numbers.

In column C (Source A Description) I have the description for what represents column B.

Column D (Invoice Source B) is a subset of the invoice numbers in Column B.

Not all of the numbers in Column B are in Column D.

Column E (Added Description for Source B)is blank.

My Goal: I want Excel to look at the number in Column D and search for its match in Column B, then look in column C for the description and copy that description into column E.

Hi, I am using INDEX($D:$D, MATCH(A1, $B:$B, 0)) to find a value in column D corresponding to the row in column B where my search value is found. It works great.

However, I now need to replace $D:$D with the result of a search. I.E. I want to search the column headers for a string to find the column I need to look down to find my value. I don't want to hard code $D:$D but make it variable based on where the header is. The reason is my imported data doesn't always put the value I'm looking for in column D but the header is always the same no matter what column it ends up being. Basically a search for a string in 1:1 that returns a column array instead of a column number. Hope you can help.

I am using the Index and Match function to compare the values from column A to the values in Column C, if there is a match found then I am returning the value from column D which corresponds to the cell that matched from column C. Below are the queries I have and any help you can provide is greatly appreciated.

1. If the value that I am returning from column D exceeds 256 characters what do I do?

2. If there are multiple matches found in column C then is there a way for us to populate all the values from column D [for the matched C cells] and put them in one single cell in the column A.

Hi there,

I have hundreds of employees, which were grouped. Each group has its own supervisor, my question is, is there any formula to apply that anytime I type the supervisor's name or employee Id., all his group will automatically display underneath???

Hi Svetlana,

I have a query re comparison of Vlookup and Index/Match functions:

I deal with large tables [rows close to half a million or more] and the problem I face with using Index/match functions to replace Vlookup for these reasons:

1. The table rows do not match as a large table will have a look for criteria in a smaller table and vice versa.

2. The two tables compared have multiple values relating to lookup or match criteria.

I have been able to solve with Vlookup, if there are only two values or text for one criteria - repeat the Vlookup formula twice: one with FALSE and another with TRUE and if the values or text are repeated use an IF formula to display one value or unique values. But if there are more than two values or text I am able to extract only two and not more.

Is there any more condition that can be nested in Vlookup other than FALSE and TRUE?

Some of the tables I use have 4 lines of description and all the 4 lines need to be picked up.

If you need further details I can send you a sample excel sheet with dummy data.

Regards, Ramki

Svetlana ,

Thank you for this post. It was a very informative and was highly helpful for me. I always wondered whether Look up with multiple criteria was possible. Got my answer today. But then I was trying to use evaluate formula to understand how it was actually working. This caused my excel sheet close abruptly. Just wanted to know whether it was possible or not to do EVALUATE FORMULA for cases that use Array .

HEELO SIR,

I HAVE A ROW NAMED NET PRICE.

ON RIGHT HAND SIDE I HAVE THREE TO FOUR RECOMENDED PRICE ADJACENT TO COMMISSION.

NOW THE CONDITION IS IF MY NET PRICE MATCHES WITH RECOMENDED PRICE WE WILL GET COMMISSION AS PER THAT PRICE.SOMETIME MY 2 TO 3 RECOMENDED PRICE MATCHES WITH NET PRICE AND I WILL RECIEVE THE MAXIMUM COMMISSION FROM THAT RECOMENDED PRICE.

I AM MENTIONING THE FORMAT OF EXCEL BELOW

NET PRICE RECO.PRICE COMM RECO.PRICE COMM RECO.PRICE PROMO

145 145 50 145 55 140 65

NOW PLEASE GIVE ME THE FORMULA WHERE COMMISSION OF 55rs IS TO BE DISPLAYED AS THERE ARE 4 TO 5 LAKH ROWS SO IT IS NOT POSSIBLE TO CALCULATE TOTAL COMMISSION MANUALY.

THANK YOU

Hey Guys,

Does INDEX and MATCH excel formulas help us to compare two columns and return me the data that is not there in the former coloumn.

For ex :

Template 1 has a PL column with row data GLCA:GLUS:GLOBAL:WCH2:WAS2:CHINA:AUST:GLEEMEA:GLUS

Template 2 has a PL column with row data GLCA:GLUS:WCH2:WAS2:CHINA:GLEEMEA

I want the data that is missing in template 2 but available in template 1.

Let me know what formula is the best...

I want use 15 min time interval values (like 15:00, 15:15, 15:30, 15:45 ...........) from A1 to A10 in a excel sheet and if the value is >0 (like 15) in B1 to B07 (actual range is B1:B10) so now I want to print cell values in A (ranges A1 to A10) based on B (ranges from B1:B10) in line chart graph. Please Help me.

A fantastic intro to the amazing world of 'match and index'.

Thanks you.

Chuck

DHAVAL KAMLESH RAMESH KAPIL

500 1500 1950 1950 1950 RAMESH AND RAMESH

25 2800 85 100 2800 KAMLESH

=+INDEX($B$2:$E$2,MATCH(MAX(B4:E4),B4:E4,0))

IF HAVE SAME AMOUNT 2 PARSON THAN WHICH FROMULA USE

PLZ HELP

Is there a way to do a 2-way Index Match Max? I've only seen things posted to find Max on a standard Index Max, but not on an Index Match Match.

Hi Svetlana,

Excellent article! I stumbled across it recently in my search to solve a dynamic lists issue I've been battling for almost a week now. My scenario:

I have several sheets in my workbook:

Sheet 1 contains a list of locations

Col1 Col2

LocationName LocationID

Syndey 1

Melbourne 2

Perth 3

Sheet 2 contains a list of courses

CourseName CourseID

Course A 1

Course B 2

Course C 3

Sheet 3 contains a list the sessions for all of the course:

SessionName SessionID

Session 1 1

Session 2 2

Session 3 3

Sheet 4 contains a list of date dates each course is run in each location:

Col1 Col2 Col3 Col4

ScheduleID Ref to LocationID Ref CourseID CourseDate

1 1 1 14/01/2014

2 1 1 18/03/2014

3 1 2 23/10/2014

Sheet 5 contains a list of the dates for each session for each course date:

Col1 Col2 Col3

Ref to ScheduleID Ref to SessionID SessionDate

1 1 14/01/2014

1 2 15/01/2014

1 1 18/03/2014

1 2 19/03/2014

2 1 23/10/2014

2 2 24/10/2014

Here's what I want to achieve:

Col1 Col2 Col3 Col4 Col5

Location Course CourseDate Session SessionDate

1. User selects Location from dropdown list(Sourced from Sheet1).

2. User selects Course from dropdown list(Sourced from Sheet2).

3. CourseDate dropdown list filters to only show matches for the selected Location and Course(Sourced from Sheet4). User selects CourseDate.

4. Sessions dropdown list filter to only show SessionDates for the matching ScheduleID and SessionID (Sourced from Sheet5).

5. SessionDate to auto poplulate with the matching record from Sheet 5.

My data is set up as per the examples above as it's near impossible to create a separate list for each combination.

Any help on who I can achieve this in Excel would be great.

Hi,

I need help with a a report.

I currently have a tab for every month of the year. I am collecting the employee's names which change every month and I have a column that collections notes based on their monthly performance.

I also have a tab which i currently have set it up to collect the data from each monthly tab to show all notes in one place.

My issue is that when I update the name list, the notes collected in the freeflow area, do not move with the employee. This is causing more manual work on my part to re-enter the comments every month.

I would like for the performance comments to follow the agent's name no matter where they land in column 1.

Can you assist?

Hello,

Thanks for all the info and help! When I added the "IFERROR" to the beginning of my formula (INDEX AND MATCH formula and it was working perfectly prior to adding the iferror feature)it removed the $ format from the cell. I cannot seem to find a way to format the cell to show it as currency.

Can you please help.

Bill

I am trying to solve a problem where I have two rows. Row 1 has Product Names eg PD1, PD2, PD3, PD4. Row 2 has corresponding quantity. When products are ordered by customers, I am trying to summarise for each customer what products they have ordered such as PD1, PD4. I have a formula that works but it is too long and makes it difficult to add another product.

=IF(ISBLANK(L6),"",$L$3)&IF(ISBLANK(M6),"",", "&$M$3)&IF(ISBLANK(N6),"",", "&$N$3)&IF(ISBLANK(O6),"",", "&$O$3

Is there some way of seeing that the cell is not blank and returning the corresponding Product Name. Thanks

Hi Svetlana,

Thanks for such awesome explanation on excel functions.

Team,

Am stack trying to use the index function but return the results as a horizontal array instead of vertical? Any idea how I can achieve this?

Elvis

Svetlana,

I was trying to adapt your tutorial to my needs with no success. I have a workbook with hundreds of worksheets. Each worksheet represents a computer. Every worksheet is identically laid out, with 10 columns but varying rows, and every column has similar information. I have a formula that looks like this: =COUNTIFS(C:C,"high",J:J,"Open") and it counts the cells that have a High severity rating AND a check state of Open. I am trying to figure out how to take those two criteria from a row and put the value of the cell in the same row of column D into a cell. Column D is the RuleID of a vulnerability. So it would look like this: IF the value in column C is "High", and the value of column J is "Open", then place the value of column D ("SV-32245r1_rule") in this cell. Can you help me?

Hello Svetlana,

Hope you can help me on this project.

I did manage to get it resolved by using vlookup however, I need to know if there's another way to do it.

Here's a dummy example:

1. Detail Tab

Status Account Amount

No Budget Apple $100

Budget Pear $200

No Budget Apple $200

No Budget Orange $300

Budget Banana $100

No Budget Orange $500

No Budget Apple $200

2. Summary Tab

Account Amount

Apple $500

Orange $800

So, all I need is to bring the results automatically of the No Budget account from the Detail Tab into the Summary Tab which in this example are the Apple and Orange and their total as well to show as one.

Is there another formula I can use?

Thanks very much in advance.

Henry

thanks for clear and simple explanation. it s very usefull

Hi,

I need to add prefix with as no of zero as required to the amount field till the lenth becomes 11 digit.

For example, if amount field is 1000, then it prefix with 7 zeros as '00000001000' and if amount field is 10000, then it prefix with 6 zeros.

Hi Shankar,

Kindly right click on cells and select format cells. Now select format special and manually type 11 zeros (00000000000) in type box. Hope this will solve your requirement.

Hi,

I need help, let me know if you can fix my problem.

Say I have Master Data:

Col A Col B

Book 123

Book 60

Pencil 50

Pencil 100

Than I expect summary table:

Col A Col B

Book 123

Pencil 100

The maximum of same index in Col A

How can we make it in excel?

I use sum(if(...) array formula to get the results from data for multiple conditions. Can Index(Search) option be used to replace this and get the count and sum from the table based on more than 2 criteria. fox ex. from a data of students, we want sum of boys having age <=10 and passed with more than 80%.

I am attempting to do a vlookup or an index/match function in excel to return a name of an organization. I want excel to look at a value in cell G24 and if it is # look in H24 and return a value from a separate tab or return a value from another tab if it is not a # in G24. In other words I am doing Vlookup,(G24,'Organization data,!A2:C229,2,0) and vlookup(H24,'fp'!A2:c926,1,0). Is it possible to combine that function to return a solution?

4 4.25 4.5 4.75 5

1.10 1.11 1.13 1.14 1.15

1.08 1.09 1.10 1.11 1.12

1.06 1.07 1.08 1.08 1.09

1.04 1.06

1.02 1.03

1.00 1.01

-22 212 233.2 235.9 238.5 241.2 243.8

-21 206 226.6 229.2 231.8 234.3 236.9

-20 200 220.0 222.5 225.0 227.5 230.0

-19 194 213.4 215.8 218.3 220.7 223.1

-18 188 206.8 209.2 211.5 213.9 216.2

-17 182 200.2 202.5 204.8 207.0 209.3

-16 176 193.6 195.8 198.0 200.2 202.4

-15 170 187.0 189.1 191.3 193.4 195.5

-14 164 180.4 182.5 184.5 186.6 188.6

Hi,please see above which is driving me crazy. I have a number I want to match with row 1 (eg 4) and I have a value corresponding to the main table (eg 192.2) and I want it to give me the left hand column value nearest to (192.2) which in this instance would be -16. Is this possible please?

Sorry, the row 1 item (4) is in cell C1 and the nearest number to 192.2 is 193.6 in cell c14 and I would like it to return -16 from cell A14.

Hope that makes more sense.

Svetlana, I enjoy your formulas explanations: very visual, very concise.

I have a long formula I am using (was created my may manager). Formula works, but I'd like to find ways to make it shorter and more"elegant". Since the formula takes almost a page in Word, I'd like to pay you for a working solution. Must be for Excel 2010 & 2013. I use both for internal reasons on 2 computers.

Thank you!

Hi Olga,

I am glad to hear you've found my articles helpful. Please send us a sample workbook with your original formula to support@ablebits.com and we will see if we can help. (To make sure your message immediately gets in the right hands, please refer to this comment or write something like "Att: Svetlana" in the subject).

Hi,

A big thanks to anyone who can help with this.

Column A

14P3WSKK1637I35DM

13A4P5FL7243G95126

13A4CL1E5051I36B28

13A4CL1E5051I09Q30

13A4Y9GE50C733N32

13A4DLES1206I90132

14P4CWN5V3W5G24PS

14P4CWN5V5Q5G24PSS

Coumn B

S

SS

28

30

32

M

Comumn C

Small

Extra Small

Size 28

Suze 30

Suze 32

Medium

I have to search for the text from column B in Column A and return the corresponding value from Column C.

Basically the last character or combination of the last two characters make up the size of the clothing.

Thanks a million.

Umar

what are the scenario where we do use index and match?

and what is If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value. Lookup_array must be placed in ascending order: ...-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE. In Match function

I am trying to set a spreadsheet so that if it looks up a table. There are three columns; size of timber, rate to charge and the rate charged in £.

I want to set it so that if the size and rate match on my spreadsheet details I have inputted then it picks up the charge rate from the table and inputs it so I know what to charge based on the size and rate chosen.

Help if possible!

Is there a way for me to copy the array formula to multiple cells without press ctrl + shift + enter at each cell? when i press shift+F9 an error appear "Excel run out of resource while attempting to calculate one or more formulas. as a result, these formulas cannot be evaluated".

Hi there hope you could help me i have a problem to use index match formula i before i was using vlookup but each time i have pasted new report the formula stop working

i have a tab with vendor list

column A Document number

Column B Vendor number

and tab with vat input

column A

document number

i need formula to go to vendor list match the document number with the document number from VAT list and return the vendor number from the vendor list which is next to the document number in this list.

My formula = INDEX( VENDORLIST $A:$B, Match(VAT List $A2,VAT List A:A,0),2))

this formula does not return the right vendor number.

Can you please advise ?

Thanks,

Aleks

Dear mam/sir i reading in vlookup formula but i did not clear so kindly that by example

Hello Pramod,

You can find the detailed explanation of VLOOKUP with formula examples in Excel VLOOKUP tutorial.

I'm having difficulty getting any of this to work for exactly what I'm wanting to do. I'm working with 2 spreadsheets: "2001 Base Data" (BD) and "Knowledge Occupations" (KO). I'm trying to pull data from BD into KO. In KO I have the Name in column D. In each successive column there is an OCC code (xx-xxxx). I'm trying to pull employment by matching the Name in column D and an OCC code with the name & OCC code in BD. BD has the name in column B and the OCC code in column C. I want KO to return the value from column F in spreadsheet BD.

Any guidance that can be provided would be immensely appreciated.

Thank you!

Instaded of using such cretical formula we can get these results just using Pivote table function " so could I know what's advantage of using Index & Match function over Pivote table"

Hello! I need to visually split "Pyramid" chart. I created one for one fiscal year but I need to have 2 fiscal years reflected on one pyramid with a vertical line in the middle. Can anybody help/show hot to do this?

where I can send "snap-it" attachment?

Thank you! :-)

THANXXXXXXXXXXX.......FOR INDEX FORMULA

hi !

i need tot know How to VLOOKUP with Multiple Criteria in different sheets if A1 = A:A & B2 = B:E,3

Tnx!

Hi, got a simple question. In your example of "Look up with multiple criteria using INDEX MATCH," the customer/product/qty example, how would you write a INDEX MATCH formula to average the Biscuits quantities?

Hi Jason,

I believe it's easier to do with the AVERAGEIF formula like this:

=AVERAGEIF(B2:B10, "biscuits", C2:C10)

Where B2:B10 are products and C2:C10 are quantities.

Very useful information.. Thank you for sharing

I appreciate it if somebody help me:

I have two different excel files X and Y. In file X there are column "Date" with format of ("e.g January 1,2012") and column "Time" with format of (" e.g 1 a.m to 1:59 a.m") . in file "Y" I have three columns: "Date"(same format of file X) ,"Time" (format of 1 a.m that means 1 a.m to 1:59 a.m) and column "Amount". I want to first compare column "Date" in two files and see if they are matched then compare their appropriate "time" and see if their time are matched, then bring the appropriate "Amount" from file "y" to file X in a new column. note: time format in two files are different.

Dear Svetlana,

I wonder if you might help with a problem…I’m not sure what I’m trying to do is possible.

I have a ‘Lookup’ worksheet with a simple three column setup

A B C

WARD TRADEAS CPAddress

1 ERNEHL Shop 1 Address 1

2 PLAINS Restaurant 2 Address 2

3 BSTALB School B Address 3

4 GEDLNG Shop 2 Address 4

5 CARLTN School B Address 5

6 BSTALB Shop 3 Address 6

7 NETHFD Shop 4 Address 7

8 NETHFD Restaurant 3 Address 8

9 NETHFD Shop 5 Address 9

10 PHOENX Restaurant 4 Address 10

I then have officers that cover particular ward(s)…so:-

Officer A covers PHOENX, PLAINS and ERNEHL

Officer B covers NETHFD, BSTALB, GEDLNG and CARLTN

What I was trying to do was to search the ‘Lookup’ worksheet for all establishments assigned to Officer A (i.e. those with a WARD code of PHOENX, PLAINS and ERNEHL) and then return the resulting list of establishments and addresses (Column B and C) into a second worksheet (so giving a list of establishments to be inspected)…and them similarly repeat this for Officer B.

Any pointers as to how I would achieve this would be really gratefully received

Many thanks

Brendan

Dear Svetlana,

My Data Table Is Like :

From Per To Per Marks

-40.01 -999 0

-30.01 -40 20

-20.01 -30 30

-15.01 -20 40

-10.01 -15 55

-8.01 -10 70

-5.01 -8 90

0 -5 100

0.01 5 100

5.01 8 90

8.01 10 80

10.01 15 65

15.01 20 55

20.01 30 45

30.01 40 35

40.01 999 15

I have Value Like :

Per Marks

-20.83 ?

10.53 ?

13.64 ?

-3.35 ?

1.63 ?

32.14 ?

8.33 ?

6.67 ?

2.08 ?

2.00 ?

8.33 ?

20.19 ?

-6.45 ?

3.27 ?

-2.17 ?

0.00 ?

28.35 ?

0.00 ?

I want Answer On "?"

I want to look "Per" in upside table.

Plz Give me formula for this

Please help. I want that the result would be like this:

RESULT: Cell A4 is Letters with "No". Cell A5 is: B,C,F,K

DATA:

Cell A1 is A, B1 is B, C1 is C,...up to Q1 is Q. Cell A2 is Yes, B2 is No, C2 is No, D2 is Yes, E2 is Yes, F2 is Yes, G2 is Yes, H2 is Yes, I2 is Yes, J2 is Yes, K2 is No,...up to Q2 is No.