# INDEX & MATCH in Excel - a better alternative to VLOOKUP

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:

INDEX(array, row_num, [column_num])

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:

MATCH(lookup_value, lookup_array, [match_type])
• 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.

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:

INDEX (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 3rd 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

1. 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 vlookup a value to the left in Excel.
2. 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.

3. 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))`

4. 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 look up from right 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 has not problem with performing a left vlookup:

`=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.

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

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

=INDEX (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 4th 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 5th 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 4th row and 5th column in range A1:E11, which is the value in cell E4. Easy? Yep! : )

### 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 1st and 3rd 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:

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

IFERROR(value, value_if_error)

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:

IFERROR(INDEX(array, MATCH(lookup_value, lookup_array, 0), "")

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.

### 430 Responses to "INDEX & MATCH in Excel - a better alternative to VLOOKUP"

1. Nancy says:

My question is, is there a way I can create a formula that will pull out code words from a variety of words that are listed in a cell? I have a column in which notes are listed but I would like to be able to find trends by using a formula to count key words listed within the notes.

2. Feroze says:

Hi I am trying to find a value in Column A and I know the value in Colum B.

For example, I have placed a value from Column B, cell B10 in a parallel sheet. next to that I want to place the value of column A, cell A10. can I please have any advise on this ?

• feroz says:

Please do not respond to this , I have reached the solution !

Thanks :)

3. Yasir says:

Hi

Thanks for this article. I want sum of all results that are there in selected data from index match instead of single result.
=INDEX('LR CashFlow'!\$B\$2:\$F\$561,MATCH(1,('LR CashFlow'!\$B\$2:\$B\$561='LR CALC SHEET'!B8)*('LR CashFlow'!\$F\$2:\$F\$561='LR CALC SHEET'!\$D\$6),0),3).

Can you kindly help me in this.

Thanks

4. TK says:

Hi

I have two columns in a file. Date (Column A) and Amount (Column B)
Date Amount
8/22/2016 600
8/23/2016 600
8/24/2016 200
8/25/2016 800
8/26/2016 600
8/27/2016 600
8/28/2016 600
What I want to achieve is described below.

In another sheet, I have certain dates. Not all the dates from above, but specific dates as below. And what I want to achieve through a formula is what is under column Sum.
Dates Sum
8/23/2016 =600+600
8/25/2016 =200+800
8/28/2016 =600+600+600

I'll explain the formula I want taking 8/28/2016 as an example.
I have calculated the sum until 8/25/2016. So I want to look at the data
from the next row after 8/25/206 until the date specified here, that is 8/28/2016 and then sum it up.

If I take 8/25/2016 as an example, then I have calculated the sum until 8/23/206. Hence I would have to pick up the numbers from the row below 8/23 (from the data) which is 8/24 until 8/25 and then sum that up.

• TK says:

Sorry, I figured it out!! :-)

=SUM(INDIRECT("Attendance!E" &Match(A22,Attendance!\$A\$1:\$A\$842,1)& ":E" &Match(A23,Attendance!\$A\$1:\$A\$842,1)))

Cell reference here doesn't really match the example data I have given above, but you will get the concept

• TK says:

Correction, you need to add a + 1
=SUM(INDIRECT("Attendance!E" &(Match(A22,Attendance!\$A\$1:\$A\$842,1)+1)& ":E" &Match(A23,Attendance!\$A\$1:\$A\$842,1)))

5. Mike says:

-20%
-25%
-27%
-23%
-19%
As above I have a number of values and I want to reduce an array of values say by 7
The result becomes
-13%
-18%
-20%
-16%
-12%
What formula can I use in excel to get this value ?

6. Patrick says:

I'm trying to create a unique list of names, from two columns containing names, but only include names that fall between a date range. Example, column A has dates, column B has a name, and column C may (or may not) has another name. Given a Start date and an end date in some other cell (say in J1 and M1), is there a formula that will return a list of unique names from both columns B & C (same names may be included in both columns, but are never the same on the same row), that have a date that is within the given date range? I've been able to get the unique list of names using this formula ("Salesperson1" and "Salesperson2" are named ranges equivalent to columns B & C in my example above):
{=IFERROR(IFERROR(INDEX(Salesperson1,MATCH(0,IF(ISBLANK(Salesperson1),1,COUNTIF(\$B\$3:B3,Salesperson1)),0)),INDEX(Salesperson2,MATCH(0,IF(ISBLANK(Salesperson2),1,COUNTIF(\$B\$3:B3,Salesperson2)),0))),"")}

Any help would be appreciated.

7. Patrick says:

Clarification: the formula I posted above references column "B" multiple times. That is actually on another tab in the spreadsheet and is where I'm placing the results of the formula.

8. A says:

9. Michael says:

Hi,
I have a Table 'Project Register' and within it I have 3 fields/columns - Client, Program, and Project. There are also fields set as named ranges for the above, using a validation formula to return valid options (working fine).

My issue is the below formula returns NA# instead of an array of row numbers where the fields are blank, or when they match one or more criteria. (IE; All = ""; Program and Project are blank when client is selected; OR when Client and Program are selected, but Project is blank)... I can't see where the formula has gone wrong. Evaluation step through shows ok to the point of returning the row numbers. Your assistance is appreciated.

=IFERROR(INDEX(Project_Register[Project Name],
IF((Client="")*(Program="")*(Project="")),1,
IF((Project_Register[Client]=Client)*((Program="")*(Project="")),1,
IF(((Project_Register[Client]=Client)*(Project_Register[Client Program]=Program))*(Project=""),1,
IF((Project_Register[Client]=Client)*(Project_Register[Client Program]=Program)*(Project_Register[Client Project Name]=Project),1,0)))),ROW(Project_Register[Project Name]),0),"")

10. Kapoor says:

hello

I need help, I have 3 different suppliers for same products with different Artikel number and product name but with the same barcodes.
Some of the product is cheap by the supplier number one but some the products are cheap by the supplier number 2 or 3.

Now my question is this: Each supplier have more than 2000 products and it is very difficult to go one by one to find out who is selling for a good price and which product from three different suppliers.

11. Krešo says:

Dear Svetlana,

three days ago I stopped on your website and found very useful information about excel.
I tried to find solution for my case(VLOOKUP,INDEX MATCH)but without success.
Maybe you can help me ?
I have two tables. First table which is in one sheet has 2 columns(1.ident number of product and 2.quantity).
Second table which is in another sheet has also 2 columns(1. ident number of product and 2. price)
Numbers of products(in raws) in first table are larger than the numbers in second table and first table includes all products(raws) from second table.
How I can multiple quantity and price from theese tables ?

Best regards,
Krešo.

12. hassan says:

hello
Dear Svetlana,
If i have three condition can i make the formula like :
=INDEX(Sheet1!\$G\$2:\$G\$71,MATCH(C\$4,Sheet1!\$C\$2:\$C\$71,0),MATCH(\$B6,Sheet1!\$E\$2:\$E\$71,0),MATCH(\$A5,Sheet1!\$D\$2:\$D\$71,0))

13. Ravi says:

Hi,

I want to use a MATCH function as follows:
=MATCH(\$B2,\$B3!\$A1:\$A10,0)

Here, the values of the cells B2 and B3 are dynamic. I have different sheets, for which I specify the name in B3 cell.

Can someone please suggest a solution for my requirement.

Regards,
Ravi.

14. Mike says:

Hi,
I have a storage tank calibration shown below. it has one column is height and the the corresponding volume on the next column. The table has wide range of cell. columns were height-volume-height volume and so on. If the table has only two columns then I will use =vlookup(value of I want to look up,range of cells table,the column number in range containing the return). Now since the height and volume is arrange in more columns how will I get the right value of I want to look up?? Please see sample.. Thank you

height volume height volume height volume
cm. lit cm. lit. cm. lit.
1.00 107 41.00 38244 82.00 77620
2.00 579 42.00 39204 83.00 78580
3.00 1325 43.00 40164 84.00 79541
4.00 2230 44.00 42125 85.00 80501
5.00 4149 45.00 42085 86.00 81462
etc...

Regards.
Mike

15. John says:

Hello.. I now actually trying using index match/IF function to try to index the value from "ColE" onto "ColB" , by matching "ColA" with "ColD".

For my eg. Shown below "Urr" got different value in "ColE" how to I insert the three different "Urr" with the different number result in "ColE" to "ColA" with the same exact result number should appear in "ColB"???

Eg.
ColA ColB ColD ColE
Doman Doman 123
Urr Urr 1234
Usw Urr 12345
Urr 123456
Usw 222

16. John says:

Hello.. I now actually trying using index match/IF function to try to index the value from "ColE" onto "ColB" , by matching "ColA" with "ColD".

For my eg. Shown below "Urr" got different value in "ColE" how to I insert the three different "Urr" with the different number
result in "ColE" to "ColA" with the same exact result number should appear in "ColB"???
And "colA" "Usw" data still match with "ColD" "Usw"?

Eg.
ColA ColB ColD ColE
Doman Doman 123
Urr Urr 1234
Usw Urr 12345
Usw 222

17. johnng says:

Hello.. I now actually trying using index match/IF function to try to index the value from "ColE" onto "ColB" , by matching "ColA" compare with "ColD".

For my eg. Shown below "Urr" got different value in "ColE" how to I insert the three different "Urr" with the different number
result in "ColE" onto "ColA" with the same exact result number should appear in "ColB"???
And "colA" "Usw" data still match with "ColD" "Usw"?

Eg.

ColA
Doman
Urr
Usw

ColD ColE
Doman 1234
Urr 12345
Urr 12345
Urr 12346

18. stillanoob says:

Hi i currently using index and match function in excel, to auto match and index the value back, if i put a set of new data to compare with my original data.

But however sometime a new data had a multiple result , how to i auto insert a row on the original data columns for the multiple result?

this is my formula code : =INDEX(\$L:\$L,MATCH(\$A:\$A,\$K:\$K,0)) it could match and bring back the index value back i wanted ... but those with multiple result it only return back to the first result it show.

19. Lida says:

Good day Svetlana,
I downloaded the examble 'index-match-multile-criteria'. It works beautifully, but when I use the same type of argument in my sheet it does not want to work. I have tried and changed and even typed in the formula with the exact spacing etc.. Nothing!! Somewhere I did something wrong. Please have a look and help me out!

• Hi Lida,

Please send the sample workbook to our support team (support@ablebits.com) or upload it to Excel Online and post a link here, and we will try to help.

20. Carlos says:

Dear Svetlana. Thank you very much for you explanations.
I have a qyuestion to you, taking the same data table in your explanation.
I would like to now how to handle INDEX/MATCH in the following case:

Below each product and in the same line of the customer, I would like to have the \$ sum

Products Lemons Apples Sweets Pies Biscuits
Customer ___________________________________________
Dan Brown ___________________________________________
Jeremy Hill ___________________________________________
Romert Acey ___________________________________________
Tom Boone ___________________________________________

Thanks

Carlos

• Carlos says:

Hello, I'm sorry, I manage to see my mistake in writing the formula, and make it work.

Thanks anyway

Carlos

21. Ronell says:

Can I return the value "" using this formula

=LOOKUP(2,1/(Z\$18966:Z\$21192=G16930),AA\$18966:AA\$21192)

Thanks

22. Ronell says:

Using this array,
=LOOKUP(2,1/(Z\$18966:Z\$21192=G16930),AA\$18966:AA\$21192)

is it possible to return the value?

Thanks

• Hi Ronell,

23. chris says:

Is there a way to autofill the array INDEX/Match Formula? I've created the formula in row 4 and need to drag it down and autofill though 2000 rows. Thank you in advance!

24. Marius says:

i don't know if this is relevant, but i have 5 cells that all have a "=IF" function in so it will look at a cell and return "TRUE" or "False" value.
what i want to do is, have it look at all 5 cells that were returned and number for the "TRUE" cell
cell values are
A2 = False
B2 = False
C2 = True
D2 = False
E2 = False

then i want it to look at all 5 cells and return a number for the "TRUE" cell so the result must be "3" for this example
the numbers that will be assigned to the cell will be

A2 = 1
B2 = 2
C2 = 3
D2 = 4
E2 = 5

how would i do this?

• Hi Marius,

You should use the following formula:
=MATCH(TRUE, A2:E2, 0)

25. Rajaram Khose says:

I want formula for following condition.

If age >22 then Basic*60% else if age =16 and less than 22 then basic*50% and if age=11 then basic*40% and if age=6 then basic*30% and age<=6 then basic*20%

26. Rajaram Khose says:

I want formula for following condition.

If age >22 then Basic*60% else if age =16 and less than 22 then basic*50% and if age=11 then basic*40% and if age=6 then basic*30% and age<=6 then basic*20%

Regards
Rajaraam

• Hi Rajaram,

You should use the following formula:
=IF(A1>22, B1*1.6, IF(A1>=16, B1*1.5, IF(A1>=11, B1*1.4, IF(A1>6, B1*1.3, B1*1.2))))
The age values are in Column A, the base values are in Column B.

27. Jinson says:

Hi all,
i need to sort the B no. column datas with respect to the A no. column datas, (both columns are text format)

• Hi Jinson,

Please try to do the following:
1. Select the range with your data - A1:B100 for example.
2. Select the Data ribbon tab and click the Sort button.
3. Select the Column A in the Column.
4. Click OK.

28. Ed says:

Hello Svetlana,

Your tutorial is absolutely great. Thank you very much.

29. Ron Ndunguru says:

Good day Svetlana

I have data in several columns, the most important are 6 columns

1.Each set of data has unique number in column 1 (unique number start from 1 to …)
2.Each unique number has a set of rows with identical description in column 2 (Comm. Payable x 2 rows, Funding Charges – this can be multiple rows, Trade Payable or Trade Receivable)
3.Each unique number amount of items in column 3 (amount in only 1 row, same row Trade Payable or Trade Receivable from column 2)
4.Column 4 and 5 are buying price and selling price respectively – on same row with Trade Payable or Trade Receivable from column 2
5.Column 6 has profit & loss. Each description in column 2 rows has a value in this column

# Description Items Buying Selling P/L
86 Comm. Payable 0 0 -5
86 Trade Payable 709 0.485 0.439 -32.61
85 Comm. Payable 0 0 -5
85 Trade Payable 1740 0.345 0.315 -52.2
85 Funding Charges 0 0 -0.06
86 Funding Charges 0 0 -0.04
85 Funding Charges 0 0 -0.06
86 Funding Charges 0 0 -0.04
86 Funding Charges 0 0 -0.03
86 Funding Charges 0 0 -0.05
86 Comm. Payable 0 0 -5
85 Comm. Payable 0 0 -5

I want to change the descriptions in column 2 rows to be column headers, in a way that each unique number will now have only one row with summation of descriptions

# Buying Selling Items Funding Charges Comm. Payable P/L
85 0.485 0.439 709 -0.12 -10 -52.2
86 0.345 0.315 1740 -0.16 -10 -32.61

Thank you
Ron

• Hi Ron,

Please try to do the following:
=IF(COUNTIF(A2:A13, "="&A2) = 1, A2, "")
Now you have only unique values for column A in column G.
=SUMIF(A2:A13, G2, C2:C13) - to sum the Items column
=SUMIF(A2:A13, G2, D2:D13) - to sum the Buying column
=SUMIF(A2:A13, G2, E2:E13) - to sum the Selling column
=SUMIF(A2:A13, G2, F2:C13) - to sum the P/L column
3. Remove the blank rows to get the results.

30. Subash says:

Hi Svetlana,

I need your help. I am in Recruiting.

In recruiting a potential candidate would pass through different stages (sourced-> not suitable/reject/voice message-> submitted-> interviewed -> offered-> hired).

The current ATS displays a single candidate at multiple stages (which gives me inaccurate report)
What I need is to be able to pull proper report with total unique sourced candidates, not suitable candidates, voice messages etc.
I need your help, if it is possible to have excel create a hierarchy system, where excel can pick one option (Interviewed), in case 2 or more options available (sourced, interviewed, left voice message etc).
And this needs to be multiple criteria, as I would be lining them against different job IDs.

Thanks
Subash

• Hi Subash,

31. Collin says:

Hi, can someone help me, I have spent 3 hours trying to find what formula I need.

I have 3 columns, 550 rows of data. Column A contains 25 options, Column B contains a 22 options for each of the options in column A, column C contains a number.

I have done 2 dropdown lists for Column A & B. what i need is a formula to look at what i have selected in the cells that have the list and bring in the number from column C.

• Hi Collin,

You should use the following array formula:
{=INDEX(C1:C550, MATCH(G2&H2, A1:A550&B1:B550, 0), 1)}
The dropdown lists are in G2, H2.
To enter this formula press CTRL+SHIFT+ENTER.

32. Roshan Herath says:

Hi Svetlana,

I have a table with 3 columns contaiin Location name, Latitude and Longitude. I want to find a lat,lon for given location from above table. I used following formula to obtain it.

The problem is lookup_value which is location name creates while joining 4 cells. Instead of writing location name within brackets, I want to give it as a function.

Then above formula does not work.

INDEX(N4:N417,MATCH('S (1)'!B550&'S (1)'!C550&'S (1)'!D550&'S (1)'!E550,M4:M417,0))

• Hi Roshan,

33. Dave Hollinden says:

Hi Svetlana,

I work with a spreadsheet in Excel that is the product of a CSV export from a web application. The export consists of a number of work tickets, each of which contains, among other things, a field with multiple values separated by commas. The CSV export results in one row per ticket, and it unfortunately creates a separate column for each of the comma-separated values that in reality are part of a single field. I never know ahead of time how many comma-separated values will be contained in the field in each ticket, so I never know how many total columns will be generated in the export, nor how many of the columns will contain a value for any given ticket. What I want to know is the number of values for each ticket.

For example, lets say in each ticket there is a field named "label". For ticket 1, label="car, truck, plane, bus, ship". For ticket 2, label="plane, train". The CSV export will contain five columns with the word "label" in Row 1. Row 2 will have five label values, one value in each of the five columns. Row 3 will have label values in the first two columns, and the remaining three will be empty.

I'd like to add a column with a formula to tell me how many values exist for each ticket. In the above example, the column would look like this.

Number of Labels
5
2

Can you help me with a formula for this?

Any help is much appreciated.

Dave

34. Jeff says:

Thank you for a great tutorial! I was able to get INDEX/MATCH working to auto-fill several different sheets in a document. Thank you for saving me from copy-paste!

35. Morteza says:

WOW, Thank you, thank you, thank you a million times. It worked.

36. sham says:

Dears ,

please tell me that , by using index/matching how we can find a specific range from a big reference of data ! . I'm having difficult using v lookup because of many raw and columns .

37. sujith says:

There are two sheets with the data, I have a requirement to check a column in both sheets and if there is any match then the entire row has to be replaced by the matching cell in the excel.Thanks

38. Damion says:

I have a formula of{=INDEX(B236:IN287,MATCH(B7,B237:B287,0),MATCH(B9,B236:IN236,0))} which works up until the 86th column but then returns an N/a when trying to find an answer in the 180 columns to the right.

is there a limit to the number of columns that can be used? I have checked that all is well within the table, no merged cells no numbers as text etc etc

im stuck as to why it doesn't work if you are able to shed any light please?

kind regards

Damion

39. Kumar says:

Hi Experts,

My requirement is : I have two excel sheets with 100 rows in sheet1 and 800 rows in sheet 2. I want to compare the sheet1 data whether is it there in sheet2 and if available that should highlight else ignore.

40. Greg says:

I want to show year-to-date performance for sales people using data from monthly spreadsheets to give me year-to date figures. I used the following:

=INDEX(MONTH1!C\$16:C\$29,MATCH(\$B16,MONTH1!\$B\$16:\$B\$29,0))+INDEX(MONTH1!C\$16:C\$29,MATCH(\$B16,MONTH1!\$B\$16:\$B\$29,0))

and so on for 12 months. It works great for all sales people who have been here all year. However if the salesperson does not appear on one or more month's sheets I get the dreaded N/A. Please help :)
Thanks

41. Sam says:

Hello,

I need some advice. I have a very large spreadsheet which hundreds of lines where I need to pull information from one column, based on the information in another.

So far I can determine whether the initial column contains text from the range needed using =SUMPRODUCT(--ISNUMBER(SEARCH((\$Y\$2:\$Y\$30),A2)))>0 this is good as it identifies the list of rows which are affected, but means that i have to manually pull the information needed.

How do I go about searching a cell for the contents from a series of others and if it is found returning the found information?

Column A "Column B
does Column A contain one of these?" If column A contains data from column B, put the data from column B here
1.0_1234_text text 1234 ??
1.0 5632_text text 7895 ??
1.0_7895_text text 5278 ??
1.0_3568_text text ??
1.0_5278_text text ??

42. migraine today says:

hi there, i believe i can do what i need to with this, however, i'm running into a problem getting it to work out.

I am comparing spreadsheet A cells C1-C387 for matches against spreadsheet B cells C1-509 and when there is a match I want to return the value of spreadsheet B column D for that particular row/match and have it populate spreadsheet A column D

Does this make sense? Thanks.

43. RAVIRAJ says:

USEFUL

44. Abdur Razzak says:

How To I Find A Value From A Specific Columns Value?
Ex: Column A1=1, A2=5, A3=10 And Column B1=2, B2=10, Column B3=15. Now I Find Number=10 From A1,A2,A3.

45. Alex says:

Svetlana,

Thank you for this post! Very informative and I agree that too many people just rely on LOOKUP functions instead of these two. However, one thing you appear to have left out is when using this with text strings there is a drawback. Special characters break the MATCH function. For instance, if you are matching on a bunch of reason descriptions and one of them has a "/" somewhere in it the MATCH function fails while the VLOOKUP will still match it. This happens even with exact matches.

Thank you,

Alex

46. Ron says:

Hi Svetlana,
How do I do this? :
I've given cell N2 a name("myRef") which contains "B5". I wanna be able to write sth like "=2 * DEREFERENCE(myRef)" instead of writing "=2 * B5". What can I write to DEREFRENECE that cell's value?

47. Vila says:

Hi Svetlana,
I've spent the entire day on this blog searching for a way to solve the problem given inline and I must say WOW you are an amazing expert :), hope you will be able to help me too with the following problem and advise which formula to use for the following problem:

I have a list of cca. 18.000 customers mixed in cca 100 cities inside one country.

Country is divided by 8 regions where 1 region has cca 7-8 cities under it. I have a separate table/list which cities corresponds to which region.

I need to assign each of the 18.000 customers to a specific region, based on the city they are in.

Logic of the list is:

Column B2:B18001 contains cities names (multiple customers per one city)
Separate table has a list of all cities under one specific region (in total 100 cities divided in 8 regions - with luckily no overlaps or false entries)

I need the formula that will find all cities in column B that belong to these 8 regions and in the column C place a corresponding region name next to the city value (do 'cities per region' division).

So it's all textual data, with multiple 'recognise' and IF 'city1' 'city2' 'city3'..... - THEN 'region 1' and repeat for the 7 other regions.
I've been searching for a solution for hours and starting to think that the fastest way would be if I manually do all 18.000 entries :(

Vila

• Hi Vila,

It's definitely not a trivial task :) To make things easier for us to understand, can you send a sample sheet and expected result to support@ablebits.com?

48. Laurie says:

Thanks very much for posting this! It helped me potentially hours of work and lowered the chance of making manual errors.

49. Reba says:

Hi Svetlana,
This is an excellent blog! Could you please help me with this question? Using the Sample Data below, what formula(s) could I use to lookup the Product Number and find all of the Product Names assigned to that Product Number? (Please see Expected Results below depicting how I'd like to summarize the results from the Sample Data.)

Sample Data
Product Number Product Name
111 Zoloft
111 sertraline
222 ibuprofen
222 Motrin
444 amoxicillin
444 Amoxil
555 APAP
555 Tylenol
555 acetaminophen
666 Vimovo

Expected Results of the Formula(s)
Product Number Product Name
111 Zoloft, sertraline
444 amoxicillin, Amoxil
555 APAP, Tylenol, acetaminophen
666 Vimovo

Thank You,
Reba

50. Nayon says:

Hi,
I have data in a worksheet like

Date Line absent %
8-Jan-17 A-1 7%
9-Jan-17 A-1 6%
10-Jan-17 A-1 3%

I want to get this data in another worksheet, where I will enter date and line name then the absent% will come automatically. Could you please help me ?

51. Matt says:

Hi Svetlana,

I am trying to create a list of items not shipped out from our facility.

I have a workbook with 6 pages. Each pages represents one size of cylinders we are shipping. Each cylinder has numbers in numerical order listed down columns on the page.

Example:
RJ001
RJ002
RJ003
etc.

Each row of the cylinders has information like customers name, date ordered, order number, etc.

One column in the row I enter the "date shipped". I am struggling to create a summary page that will list ALL cylinders from ALL pages that has no "date shipped" filled in. I am just looking to list the cylinder numbers on the summary page which has the "date Shipped" column not filled in. Then when I fill it in, it will be removed from the list. Am I looking at the right formula for this or am I aimlessly struggling for nothing? Any help would be appreciated. :)

52. Sydney Patrick says:

hie help me on this one, which would I use to rank students using index match. One student is being dropped if they are sharing the same position. for example

Table 1

STUDENT NAME MARKS POSITION
MIKE RICHARD 560 1
CARLO JONES 555 2
RUTH TONEY 555 2
BRIAN JAMES 552 3

I want the formula to give me results as shown in table 1 above but instead I am having results as indicated below in table 2 with 1 student missing on the list

Table 2

STUDENT NAME MARKS POSITION
MIKE RICHARD 560 1
CARLO JONES 555 2
RUTH TONEY 555 2 - (missing on the list)
BRIAN JAMES 552 3

which formula should I use to have all students on the list even those sharing the same pos

53. jenny says:

Wow, amazing articles!

How did you learn this all?

• Thank you, Jenny! Just read a lot, practice a lot, and work with colleagues who know a lot more :)

A B C D
1 Name Date Issue Quantity
2 Sultan 15-03-16 Book 4
3 Rehman 16-5-16 Novel 3
4 Zakir 18-5-16 Pen 18
5 Sultan 19-5-16 Eraser 14
6 Zakir 20-5-16 Novel 8

I want that I just give a name in a cell and it show Complete Record in this sheet as like this.
Zakir
Zakir 18-5-16 Pen 18
Zakir 20-5-16 Novel 8

55. Ra1 says:

i would like to know if I will be able tp us e the match and index command to look at two rows one beneath each other to match if a number is the same between the two rows in each cell.

Once the match is found, can it then copy the two cells from each row to another cell

Thank you

Raj

56. Elijah says:

Hi, I have an Excel workbook contains list of PlayStation players, so we merge them manually, then I want to do automatic check on those players name and check their score who win and it will also based on the first winner (maybe based on the time it was inputted) then the the formula should take the player to next level on the table.... The formula I was using before is if statement (=IF(C6>E6,B6,IF(E6>C6,F6))) so I discovered that some people don't play their game according to how we fix them, please what can I do to achieve this ...... The criteria I want to follow is this***check column c4:c200&e4:e200 the last inputted cell should and check the highest score, it should move the last player if the highest score is from column c or from column e

57. Mitch says:

Hi!

I want to do a simple vlookup as normal. But I have 2 different "sets" I need to vlookup in...

Example:

Maine
Maine
Maine
Virginia
Virginia
Virginia

parts:
x, y & z available at both Maine and Virginia

I want to vlookup usage of X specifically in Virginia

58. Mangal says:

Hi there
tell me about the formula or function that to help me in tax if the tax little difference it not important
like the following example

thnx alot for explanation.

60. Cheech says:

Hello:

After reading through this section there are some very creative solutions here. Unfortunately after a bunch of failed attempts I haven't quite figured out the correct method for solving mine, and request your assistance.

This problem involves the processing of a transaction log table of stock trade trades (buys and sells). The spreadsheet(s) contains 3 tables (in different sheets) , table 1 contains the transaction log, table 2 contains the symbols of each of the stocks in table 1, and table 3 contains the formulas for summarizing the data for each symbol collected from table 1.

In table 1 there can be many entries for each stock symbol and although most of the data I needed can be collected using Sumif(s). The ones that I am having a problem with is Min and Max.

Can you help with the formula for extracting the Min (or Min) values from the P&L column for each stock symbol using the symbols in table 2 please?

An example of table one is as follows:
A B C D
Symbol O_Price C_Price P&L
1 ABC \$10.00 \$11.00 \$1.00
2 ABC \$11.25 \$11.85 \$0.60
3 ABC \$12.25 \$11.85 (\$0.40)
4 DEF
5 DEF etc.
6 DEF
7 DEF
8 etc.

Table 2
A
1 ABC
2 DEF
etc

Table 3 is the results table containing the summarized values, 1 row per symbol.

Thank you,

Cheech

61. Joel says:

I'd like to take this opportunity to get a result from someone who has amazing skills in excel formula but to make everything simple. I had this little problem and this how it goes. Let say from column A1-A3 there is a duplicated info. Example: TB944009 (this is repeated thrice from A1-A3) Now, I have heavy table from my sheet that will certainly get the exact value that I want. My goal is to capture all infos that is equal from my look up value(Even if its different information). I use vlookup and it works out a bit, because every time I drag down my formulas it says N/A however, when you search it manually on the table you'll find it there. I tried to use \$ sign(to limit the searching) for them to find all those information that I need. but it did not worked on my end. I hope that some one will share his/her knowledge so I can do my task easily. Thank you.

62. James Lightfoot says:

I have learned so much via your numerous invaluable articles. Your info has saved me so much time, especially with the more complex data compilation & analysis. I would gladly pay a subscription for all of this information. Thank you & thank you.

63. Wes Waite says:

I have an array with column headings I am sorting on. Once I find the right column I need to copy all cells below to another location, where the original formula resides. Tried using INDEX and Match but come up with some crazy results. Can I use Index and Match to do this?

64. Manuel says:

Hi Svetlana, very interesting article. I was looking for how to do it but looking up for a value in a whole 2-dimensional range (matrix) instead of an array. The problem is that MATCH function only works with 1-dimension arrays. Any ideas?

Hi there,

need help plz, am a beginner and trying to create a small template where I will be calculating price of goods plus GST applied. In description column I will write details of goods, now is there a way where I can apply a filter saying lets say description column is B. GST is applied on everything except food items. I have five items to list i.e.tea, coffee, sugar, creamer and Sweetener. so what formula can I try which will say if these 5 items GST will be 0 else it will be E*5%.

DESC QUANTITY UNIT PRICE SUB TOTAL GST
PILLOW 4 13 52 2.6
SUGAR 3 10 30 1.5

• Hi,

I'm sorry, I'm afraid your task is not entirely clear for me. But from what I understand, I believe you may want to check out the following articles that may help you build the formulas:
COUNTIFS - to count the items.
IF - to return 0 or multiply by 5% depending on the COUNTIFS result.

I really hope you'll find those tutorials helpful.

66. Katrina says:

Is it possible to find answers that DON'T match? I have a list of people who have completed trainings. I can see which trainings they have completed, but I would like to see which ones they have not. I currently have the list of everyone who has completed certain courses, and I have a list of all required courses. I'd like to have a list of each name and the courses still required to be taken. Any suggestions would be helpful!

67. Steph says:

Hi,

Trying to create an excel spreadsheet that will help with costing for a construction project.

Column C: Cost code

I want to match the area and task and for the cell to output the cost code according to the lookup table. I tried to use the formula you have provided above but keep getting "#Value" - what am I doing wrong?

The values I want to match are part of a drop-down list. Is this my problem?

• Steph says:

I think I figured out the problem - needed to press Crtl + Shift + Enter. How come we need to do that for this formula?

Hi there,

I have a question that I am hoping somebody here might be able to provide some insight. So thanks in advance.

I have a table of values (%'s) as outlined below:
| Decile 3 | Decile 4 | Decile 5
Metric X 25.72 - 28.72 28.73 - 30.38 30.39 - 31.52
Metric Y 18.96 - 24.69 24.70 - 35.23 35.24 - 45.87

Also, I have data(%'s) as follows:
Metric X: 100 / 400 = 25.00. Now, based on this score, this results in the 2nd decile, as referenced above. Assuming that I "freeze the denominator", how much would the numerator (100) have to increase in order to reach decile 5? It would be easy to do some simple algebra to calculate that number.

However, I am trying to come up with an automated way to calculate the number to increase the numerator to achieve a given decile.

*Please disregard "Metric Y" above, but note that I have many metrics with different decile ranges in this table.

I appreciate all input.

Thanks!

**Correction, a 25.00 would result in Decile 1 that is not shown. That is not key, but I wanted to explain since I just caught that mistake.

69. nathaniel says:

I’m having some difficulty figuring out how to utilize Excel’s reference functions to do horizontal and vertical lookups, where the task is to search for a particular value in a specified row, and return the text value in the header of that value’s column. It seems like a combination of Index & Match would be desired, but I can't figure out a workable syntax that doesn't produce errors.

For example
Column A contains record ID’s. (e.g. 101-200)
Columns B-F contain options (e.g. apples, oranges, pears, etc.)
Cell values contain a 1 for first choice, 2 for second choice, 3 for third choice, blanks for unranked options.

An example of the desired outcome is to lookup a particular id (which would be identified by cell reference or formula, not a fixed row #), find the value ranked 1 in that row (values will not be ordered), and return the name of the option associated with that rank. For example, lookup record 25, find rank 1, return oranges if oranges is the header of the column containing rank 1 for record 25.

Any help would be greatly appreciated. Thank You.

70. Ev says:

Hello, I am new to Excel and needing to write some formula or vlookup to select the min and the max values of an array like this one:

1 9/8/2017 20:20 x y 16,015.00 16,017.00
1 9/8/2017 20:20 x y 16,055.00 16,057.00
1 9/8/2017 20:20 x y 16,095.00 16,097.00
1 9/8/2017 20:20 x y 16,135.00 16,137.00
2 9/9/2017 15:55 x y 15,815.00 15,817.00
2 9/9/2017 15:55 x y 15,855.00 15,857.00
2 9/9/2017 15:55 x y 15,895.00 15,897.00
2 9/9/2017 15:55 x y 15,935.00 15,937.00
2 9/9/2017 15:55 x y 15,975.00 15,977.00
3 9/10/2017 1:02 x y 15,615.00 15,617.00
3 9/10/2017 1:02 x y 15,655.00 15,657.00
3 9/10/2017 1:02 x y 15,695.00 15,697.00
3 9/10/2017 1:02 x y 15,735.00 15,737.00
3 9/10/2017 1:02 x y 15,775.00 15,777.00
4 9/13/2017 1:26 x y 15,415.00 15,417.00
4 9/13/2017 1:26 x y 15,455.00 15,457.00
4 9/13/2017 1:26 x y 15,495.00 15,497.00
4 9/13/2017 1:26 x y 15,535.00 15,537.00
4 9/13/2017 1:26 x y 15,575.00 15,577.00

Would need to extract the 16,015 and the 16,137 for the cells with a 1 on the first column then do repeat the same for column with value 2, 3, 4...
The values needed to be returned for column with a value of 2 would be 15,815 and 15,977, column with a value of 3 would need to return 15,615 and 15,777......

Thank you very much in advance

Ev

71. Naik Shreepati says:

Hi,

I have one doubt in Index match function with multiple criteria. If we have more than one identical values in the main sheet, it will pull the first found value from the lookup table. Is there any solution?

I have one sheet having Invoice number, amount, Supplier name, Currency. And in the main sheet for different Invoice numbers, same combination of Supplier name, currency and amount is there.

Is there a way to populate a result in a cell matching two columns, looking for a value in column A and populating the corresponding value from column B? For instance I have column A listing 1-90. In Column B I have a dollar amount. I want to have that dollar amount as the automatic result when the same number from column A is typed in another cell. I hope this makes sense! :-)

73. DaveQB says:

74. Shankar says:

=IFERROR(INDEX(\$K\$1:\$AA\$1,MATCH("Z",K3:AA3)),"YTS")
In the above Index-Match function, I wanted to Index a value from K1:AA1 by Matching and finding the final text value from K3:AA3. But, I want to exclude cells T3:V3. If I use the following, I get result only upto K3:S3. Please suggest a solution.
=IFERROR(INDEX(\$K\$1:\$S\$1,MATCH("Z",K3:S3)),INDEX(\$W\$1:\$AA\$1,MATCH("z",W3:AA3),"YTS"))

75. Mandy says:

Hi - I am wondering for this formula,

=MATCH(\$C\$78,\$A\$1:\$L\$1,0)
This allows me to return the column # there is a match of the text in C78 in Row 1, from column A to L.

Is it possible to extend this to an area i.e. multiple rows, vs single row? I want to do 20 rows i.e. \$A\$1 to \$L\$20 for example.

If I want it to return a value I want to translate to for each of the column, how do I specify? Say if it's in column A, it should populate with "Apple", column B with "Orange" etc.

• Hi, Mandy,

since MATCH works with either column or row, you need to use VBA code or a macro to solve your task.

76. mehmood says:

Dear Svetlana Cheusheva,

I am a demand planner.

I have a 3 types of milk but I want raise demand on average consumption on milks, which formula will be apply on this condition.

Regards,
Mehmood

77. Drew says:

Hello Svetlana,

Thanks much for all the instructions on index/match functions.

I am trying to index an array and find the value in Column B if the value in Column A match a certain text string ignoring all spaces and any characters other than letters or numbers. For example, the text string I am trying to match is K15 but the column A may have K15 shown as K15, K 15, K-15, K_15, or K _ 15 etc. How can I make the index/match functions consider K15, K 15, K-15, K_15 and K _ 15 as the same text string when it does the matching search?

Thanks much and really hope I can get some help with this question.

Drew

78. Christopher says:

Svetlana,
Thank you so much for your very logical and understandable explanation of the Index and Match function. I had dabbled with it in the past but never really grasped it. Your tutorial made it very clear! I was having problems on a spreadsheet using VLOOKUP where is would not allow me to have more than 2800 rows. I was able to switch to Index/Match and it works perfectly. Thank You!!!!

79. Sandra says:

Hello- This formula doesn't seem to be working for me. Can you tell me what I'm doing wrong.
I have the following problem:
Sheet 1 contains the following data:

M N
Period Room
2 356
2 246
3 310
6 361
4 315
5 313
7 3
1 GYM-C
7 155
2 201
5 204
7 266
4 3
6 259
1 110
1 364
3 201
5 3
7 110
7 266
4 204
6 1
2 201
3 201
6 155
1 240
5 360
2 201

Sheet 5 contains the following data:

A B C
Room Wave Period
1 A 5
3 A 5
110 B 5
112 B 5
114 B 5
125 A 5
151 D 5
154 D 5
155 D 5
158 D 5
160 D 5
161 D 5
201 B 5
202 B 5
203 B 5
204 B 5
205 B 5
210 B 5
213 B 5
217 B 5
240 C 5
246 C 5
254 C 5
255 C 5
258 C 5
259 C 5
264 C 5
265 C 5
266 C 5
270 C 5
304 A 5
310 A 5
313 A 5
315 A 5
351 D 5
352 D 5
355 D 5
356 D 5
357 A 5
359 D 5
360 D 5
361 A 5
362 A 5
366 A 5
212A B 5
212B B 5
Aqua Out A 5
Gym-B D 5
HCC A 5
RCA C 5

I need a formula that will match columns M & N of Sheet1 with Columns A & C of sheet 5 and return Column B of Sheet 5 in Sheet 1 "IF" Period=5.

80. Anand says:

Dear Ms. Svetlana

I need FIRST CHARACTER TO BE NUMERIC(SINGLE DIGIT 1 TO 9) FOLLOWED BY A DASH SYMBOL AND ONLY TEXT CHARACTER FOLLOWED BY IT, AND TOTAL LENGTH TO BE 6, Kindly can you tell me how to use it in data Validation tool in excel 2016

Product Code Product name
1-ABZX XXXXXX
9-BTGH XXXXXX
8-RCTB
6-XYXT
0-ABCD

81. Chandru says:

Curr. Amt in loc.cur. LCurr Eff.ex.rate Formulae Currency Actual Rate Rate +10% Rate -10%
AUD -21,928.99 SEK 6.4573 IF(AND(L2>\$T\$2,L2\$T\$2,L3<\$S\$2),"YES", "No") AUD/SEK AUD 6.45 7.09 5.80
EUR -8,905.29 SEK 9.7415 YES CHF/SEK CHF 8.42 9.26 7.57
EUR -5,668.19 SEK 9.7415 YES CNY/SEK CNY 1.27 1.40 1.14
EUR -21,310.71 SEK 9.7535 YES DKK/SEK DKK 1.31 1.44 1.18
GBP -3,030.09 SEK 11.16096 No GBP/SEK GBP 11.03 12.13 9.93
GBP -11,536.34 SEK 11.11894 No JPY/SEK JPY 0.07 0.08 0.07
NZD -21,607.94 SEK 5.78294 No NOK/SEK NOK 1.03 1.13 0.93
NZD -3,559.39 SEK 5.78292 No NZD/SEK NZD 5.81 6.39 5.23
USD -14,824.97 SEK 8.39942 No USD/SEK USD 8.42 9.26 7.58
USD -14,824.97 SEK 8.39942 No CZK/SEK CZK 0.38 0.42 0.34

I have created the formula but for each currency tab but i'm unable to create the formula in consolidated file could you please help/advise me for the above.

Thanks,
Chandru

• Hello, Chandru,
For me to understand the problem better, please send me a small sample workbook with your source data and the result you expect to get to support@ablebits.com. Please don't worry if you have confidential information there, we never disclose the data we get from our customers and delete it as soon as the problem is resolved.

82. Chandru says:

I have created the formula and its working only for each currency tab but i'm unable to create the formula in consolidated file could you please help/advise me for the above.

83. Fernando Araiza says:

Hello,

I'm trying to pull information from one sheet to another.
Basically I have one sheet with the following information

Distributor_Company Product_Name Price

Now I want to create a sheet for each Distributor Company that looks at the first sheet and pulls all the Product_name it carries and price

There are 3 shifts, Every shift needs change duty after a Week (Sunday) of the month through 24:00 hrs. as given below detail.

Date: Friday,01/12/2017
Shift:A 00:00 TO 08:00 hrs (Night-duty)
Shift:B 08:00 TO 16:00 hrs (Morning-duty)
Shift:C 16:00 TO 24:00 hrs (Evening-duty)

Date: Saturday,02/12/2017
Shift:A 00:00 TO 08:00 hrs (Night-duty)
Shift:B 08:00 TO 16:00 hrs (Morning-duty)
Shift:C 16:00 TO 24:00 hrs (Evening-duty)

Date: Sunday,03/12/2017
Shift:A 00:00 TO 08:00 hrs (Night-duty)
Shift:B 08:00 TO 16:00 hrs (Morning-duty)
Shift:C 16:00 TO 24:00 hrs (Evening-duty)

Date: Monday,04/12/2017 (Duty Shift would be Changed)
Shift:A 16:00 TO 24:00 hrs (Evening-duty)
Shift:B 00:00 TO 08:00 hrs (Night-duty)
Shift:C 08:00 TO 16:00 hrs (Morning-duty)

Please help me that how to set formula in excel that will show me Shifts: A, B or C will perform their duties on given date in 24:00 hrs.

May kindly please be helped me in this case. in advance I shall be very thankful for him/her.

• Hello,

I'm afraid there's no easy way to solve your task with a formula. Using a VBA macro would be the best option here.

However, since we do not cover the programming area (VBA-related questions), I can advice you to try and look for the solution in VBA sections on mrexcel.com or excelforum.com.

Sorry I can't assist you better.

85. Grant says:

I don't usually do this but I have to give you praise for this wonderful example. Thank you so much!

86. Mubashir says:

Hello

I am looking for a formula which will find a value first [(say Stock Name) from a table where there are many stocks with day to day turnover values}and then sum or average the corresponding values [day to day turnover for a month]for that particular stock.

Say for example:
Stock Name 5/12/17 6/12/17 7//12/17 8/12/17 9/12/17
ABBANK 20 22 25 15 12
Brac Bank 35 38 40 80 70

In another sheet we want to fetch the sum and average values for Brac Bank..

• Hello,
For me to understand the problem better, please send me a small sample workbook with your source data and the result you expect to get to support@ablebits.com. Please don't worry if you have confidential information there, we never disclose the data we get from our customers and delete it as soon as the problem is resolved.

87. Ramki says:

Hi,

I did find the Index/Match multiple criteria formula very good however I have an issue in using this formula in different sheets.

Table 1 = Lookup
Table 2 = To be populated table

I have used the formula to check two criteria - a. Employee number and b. Department name.
The first row in the Lookup table in the relevant filed contains zero and so when I apply the formula the entire field is populated with zero [as in the first row of the Lookup table. I guess that this is because of the fixed reference rule applying.
Can I have the formula without Fixed reference so that the like data reference will be picked correctly?

Given below is the sample data table:

Formula used - {=INDEX(Lookup,MATCH(1,([@[Emp no]]=Lookup[Emp no])*([@Dept]=Lookup[Department]),0),25)}

Emp no Dept Amount Amount from another
from same sheet sheet.Repeats first
value
1 Governance 38000 38000
1 Customer Service 27000 38000
2 IT 40000 38000
2 Environment Services 35000 38000

Thanks for the assistance.

88. Ramki says:

I tried copying the table but got the above result.
But the crux is the first amount is the result from the same sheet and the second amount is result from another sheet.

89. Dave says:

This is my first time on any forum...
I'm trying to create a formula :
"Spreadsheet 1" is where I'm trying to get my information.
"Spreadsheet 2" Cell C2, the formula should read, "Refer to Cell A1 "A", look in Spreadsheet 1, and put the values for MON in cell C2, do the same for cell C3 and so forth.

A B C A B C
1 A MON 10 1 A
2 A TUE 11 2 MON ______
3 A WED 12 3 TUE ______
4 B MON 20 4 WED ______
5 B TUE 21 5 B
6 B WED 22 6 MON ______
7 C MON 31 7 TUE ______
8 C TUE 32 8 WED ______
9 C WED 33 9 C

90. SOHEL says:

i input the FORMULA OF A6,=INDEX('RM DETAILS'!\$J\$5:\$J\$4101,MATCH(1,INDEX(('RM DETAILS'!\$F\$5:\$F\$4101='LAST PRICE'!A7)*('RM DETAILS'!\$I\$5:\$I\$4101=MAX(IF('RM DETAILS'!\$F\$5:\$F\$4101='LAST PRICE'!A7,'RM DETAILS'!\$I\$5:\$I\$4101))),0),0)) BUT OUT IS SHOWN #N/A
NOW WHAT DO I DO ?

91. SOHEL says:

NOW WHAT DO IDO ?

92. SOHEL says:

DEAR
I ENTERED A FORMULA BUT SHOWN IN #

93. Val says:

I'm trying to return a list of individuals scheduled to work nights on a specific date.

Sheet 2
From Sheet 1, the names in column 1 associated with an array of shift values (i.e. N, N1CB, N2CB, N1, N2, etc) found in the column associated with the date entered in cell A1 on Sheet 2.

Sheet 1
Column A: Names
Row 1: Date (starting 1/1 - 12/31)
B2:NJ54: Variety of values showing shift worked (D, N, D1, N2, etc)

94. Saj says:

I have an excel sheet with 5 columns. And 40000 rows of data.
1st column has Id no
2nd Date
3rd Name of institution
4th Subject
5th Course
The solution i require is
The formula should search for identical Ids, then search for identical date within that id, identical institution within that date, idential subject within that institution and concancenate the courses in one cell for that institution.
Can this be done by an array or does it need to write a macro.

• Hello, Saj,

We have a ready-made solution for your task. You can quickly and easily merge courses for identical values in the first four columns on your sheet using our Merge Duplicates Wizard. You can install the fully functional 7-day trial version of the add-in and see how it works. Here is the direct download link.

Please see the detailed instructions how to combine data from duplicate rows into one on this page.

Hope you'll find this information helpful.

95. Idelfonso says:

I like too much. Thanks

96. Nasir says:

Eg,
A In
B Out
C out
D In
E In
F Out

Now I want to get the result of above criteria separately Like In’s separate and Out seperate with the help of formula.

97. Renato E. Entera says:

Goodmorning Ms. Lana,

I am from the philippines. and i am very glad reading your articles. I have learned many things.
Do you have a free course regarding excel formula?

Thank you and mabuhay!

• Hi Renato,

Thank you for your kind words! Regrettably, we do not have any courses on Excel. Our blog articles is all that we have :)

98. ray says:

hi ablebits team, please help with a formula that will compare multiple rows with multiple columns and match data of the same pattern.

table 1 table 2
a b c d a b c d e
6 13 35 60 5 6 35 39 60

i will really appreciate your help.

thanks.

99. Zac says:

Hello, I am interested in the posibility I see in your Merge Duplicates wizard. However, it appears this may only be designed for finding duplicates within a column. Is there a tool which can merge duplicates within a ROW, and return the column headers as the output? Specifically, I would like to find all the zero cells in a row, ignore the non-zero cells, and compile a list of column headers for the zeros in each row.

100. Ellen says:

Is there a way to do a reverse index match? I have a calendar set up for appointments times by client name based on a weekly calendar grid. My software will give me a list of clients by date and time and I would like to populate the calendar without having to do it manually. Is there anyway to do this? Vlookup will do it by day, but not by time.

• HOME
• PRODUCTS

Add-ins for Microsoft Excel 2016 - 2007
Plug-ins for Microsoft Outlook 2016 - 2007
Apps for Excel for Mac