*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 lookup 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. With INDEX MATCH, your lookup column can be on the right side of your table as well. 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 you are working with relatively small tables, the difference in Excel's performance will most likely be unnoticeable, especially in recent versions. But if you use large worksheets with thousands of rows and thousands of lookup formulas, Excel will work much faster if you use MATCH INDEX rather than VLOOKUP. Generally, the use of Index / Match formulas increases Excel's performance by 13% compared to equivalent Vlookup formulas.VLOOKUP's impact on Excel's performance may be especially evident if your workbook contains hundreds of 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))`

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 lookup 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 lookup by 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.

Hello again Svetlana,

I'm not sure if this can be done using a Match/Index or Look Up formula, but let me know what you think.

I have an Expenses sheet in an accounting work book with approx. 35 columns marked for various contracting expenses. Just to keep things brief, I have an "Expense Code" column (say column A) for each expense, e.g. Accounting has code 110, Bank Fees has code 111, Freight has code 112 and so on. The next column (say column B)has the "Expense Total" for each expense. The next column (say column C)has the "Amount to Allocate" totals [amount to allocate is the total expense less G.S.T.(goods & services tax)] and all the following columns are the various expense columns to which the "Amount to Allocate" figures are entered. I would like to formulate all the various expense columns to self-populate with the appropriate "Amount to Allocate" figures on recognising the expense code.

Can formulas work in this scenario?

Thanks in advance for any advice.

Cheers,

vcoolio.

Hi Vcoolio,

I'm not sure I understand the task correctly. Please see the example we created and let me know if you want something different.

Dear Svetlana,

That's it! Well done! The only thing is that the "Amount to Allocate" (column C)are the amounts to go into the various expense columns (D, E, F etc.)and not the "Expense Total" but this I can sort out for myself.

The next thing is, will formulas work in this scenario? I have been toying with SUMIF formulas and they appear to work ok except for a couple of hitches. I'll see what you come up with and then we can put our heads together.

Thanks a million.

Cheers,

vcoolio.

Dear Svetlana,

Please ignore the following paragraph from my last post:-

"The next thing is, will formulas work in this scenario? I have been toying with SUMIF formulas and they appear to work ok except for a couple of hitches. I'll see what you come up with and then we can put our heads together".

The sample you sent to me was 'read only' so I could not access the formulas and for some reason I could not also access the second sheet with the table in it.

However, I managed to get around this and I can access everything now. I now see what you have done and it is brilliant to say the least! It suits my purposes wonderfully.

I have a couple of more questions for you:-

1)As mentioned in my last post, the "Amount to Allocate" are the amounts that need to go into the various expense columns, so, in the formulas, should I just change the "B" into a "C" in the last section of the formulas?

2)Quite often, I have a number of different expenses on the one invoice or statement. For example, if I have an invoice from a hardware store which totals $1,000.00, $500.00 of this amount may be for materials, $300.00 may be for tools and $200.00 may be for protective clothing. So, when I allocate the different amounts on the expenses spread sheet, they are all on the same row beside the supplier's (hardware store) name. Can the formulas be adjusted to allow for multiple entries on one row or would this just be complicating things somewhat?

Again, many thanks for all that you have done.

Cheers,

vcoolio.

I would like to have the same but i need total of repeated expense code

is it possible ??

I would liketo have total of repeated expense code

is it possible ??

=INDEX(A1:F20,MATCH(H5,$A$1:$A$20,0),MATCH(H6,$A$1:$F$1,0))

the above formula will solve only the amount but not for the repeated

I didn't get your example,and one more thing why there is a table in second sheet?

Dear

From above example of index match to find a value of intersection what formula will be use to find intersection of value means in above index formula finds the population value of the intersection of usa in 2015 what if i need country and year by using population value??

Hope i have described my point.

Hi Can you please help me to know how to choose from different price A & B & C & D and get the best price from these tnx.

Hi Svetlana Cheusheva

Can you please help me to know how to choose from different price A & B & C & D and get the best price from these tnx.

Hi, please can you assist?

I have four columns:

1. Two columns of percentages and exposures and in

2. Two seperate columns with percentages and exposures

I want to match whether the percentages and totals in the one set is greater than or equal to the percentages in the other set and if they are; i need to input a message: "OK" or if they arent: "Incorrect".

Is this possible.

Hello Sai,

If you want to show the Message window (box), then a special VBA macro is needed. Sorry, I am not able to help with this.

This is very simple indeed!

Proceed as follows:-

In column B3, type 111

In column C4, type 112

In column B4, type Account Code

In column C4, type Amount

In column D4, type Bank Fees

In column E4, type Freight

Similarly, type other account heads F4, G4, H4, etc.

Now the formula you need to post the expenses from the Amount (C4) column to the appropriate column where the code is located.

In column C5, type 8,908 under amount column and type 111 in cell cell B5. This is assumed to be for bank fees.

In order to make Excel post this to column D5, type the following formula in cell D5:

=IF(B5=$B$3,C5,0).

In cell C6, type 5,000 and type 112 in cell B6 for freight. Write the following formula in cell E5: =IF(B6=$C$3,C6,0)

You should copy the above formulas down the columns to wherever your account postings are expected to get to. Please take careful note of the absolute referencing in cells B3 and C3. Joseph Osasebor, FCA, MBA

Below is the some amounts

2,129

8,938

2,198

12,977

39,124

1,219

24,775

1,287

863

3,723

9,346

in above amount if i Add few amount it will come 14535 .

what is the formula for this in excel to calculated

Using Match/Index... I understand their functionality, and how to return the location of a 'match' into a specific cell. But... is there a way to return that entire ROW where the match is located?

Thanks for a terrific article with a very lucid explanation of the subtleties of Index Match

I have this formula which produces the answer I am expecting except when the value in B5 is repeated

{(=Index('July 14'!A1:AQ500,Match(B5,'July 14'!$B$1:$B$500,0),Match(A5,'July 14'!$A$1:$AQ$1,0))}

Is there an additional element I can add to overcome the problem of always finding the first occurrence in the source data

Rob

Rob

Hi, I would really like if some one help me with my problem. The problem is Index/Match function is working fine to find unique MAX/MIN values but m not able to calculate the required data which contains repetitive values.

Eg: PersonA - 100%, PersonB- 90% & PersonC100%. When m trying to find the Name and the value let say TOP 2, I am not getting Person A and Person B as both has got the max scores. Instead i am getting PersonA and Person A.

Any solution with Index/Match or like that function to get the name of both the Person who has got similar values.

Hello Niraj,

We have created an example for you, you can download it here. Hopefully, this is what you are looking for.

Hi,

The example would be of great assistance, but unfortunately cannot find the page you r refering to. Is it possible to repost it?

Thank you in advance.

Sorry, Alex, the link got broken during our blog engine's update. It's fixed now and here's a copy, just in case : )

Need Help!

I have created the below formula

=LOOKUP("6070-24 · Cleaning SuppliesGarden",Sheet1!$E$1:$E$600,Sheet1!F$1:F$600)

which basically say - look for "6070-24-Cleaning supplies Garden" on Sheet1 in coluwn E and take corresponding valve in Coluwn f. But I have more than one cleaning supplies account eg

6070-24-Cleaning supplies Garden

6070-25-Cleaning supplies MTC

6070-25-Cleaning supplies Repairs

I would like a formula which will read - sum all rows from coluwn F which begin with 6070 in coluwn E.

Hope you understand

Hello Willie,

Try the following SUMIF formula:

=sumif(Sheet1!$E$1:$E$600, "6070*", Sheet1!$F$1:$F$600)

I don't really know under which function this applies, but I had a question about pulling formulas from references. The end goal is to create a sheet in which a process can be chosen from a drop-down menu and the next X rows will be populated with the X steps of the process selected. For example, if I have two input cells of side lengths of a triangle, I could select "Pythagorean Theorem" (all steps of the process would be on another sheet) from the drop-down list, and the next 4 rows will show "A^2", "B^2", "A^2 + B^2", and "SQRT(A^2 + B^2)", with the corresponding values based on my inputs next to them. However, if I pick "Area" from the list, it will calculate the area of that triangle with two steps (A*B and 1/2 A*B).

So it essentially boils down to two or three questions:

1) Can Excel display a full list based on a reference cell? If so, can those lists be different sizes?

2) Can you pull a formula from another cell and have it operate on new input in the sheet it is being pulled into?

Thanks!

Hello Alex,

The answer is "yes" to all 3 questions, though Excel is not the best way to implement your idea.

1. You can use the Vlookup function to get the 2nd, 3rd and subsequent occurrences based on your reference cell. The lists can be of any length. For more details, please see this example.

2. See this topic on the MrExcel forum.

Svetlana,

I am trying to use the formula you set up for "Look up with multiple criteria using INDEX MATCH."

I'm having trouble with the MATCH part of the formula:

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

The problem I have is that this part of the formula (A2='Lookup table'!$A$2:$A$13) returns the value of the row in the array where the value is found, as does this part of the formula (B2='Lookup table'!$B$2:$B$13). It does not return 1 or 0 for true or false.

So the comparison of MATCH(1, ...) is returning gibberish, and not the row where both parts of the A2 lookup and B2 lookup are true.

Let me know if you want to see the files I'm trying to merge.

Thanks.

Hi there,

I had a query regarding some household budgeting I am commencing. My goal is to import bank transaction data and dump the transactions onto a xls sheet. Then I wish to run certain formula's over the data which allocates the expenses as I want them. For example, food bills may come from 5 different groceries, how do I build a formula that will let me allocate all 5 to the one account, being food. And so on with other expense categories?

With thanks,

Great post! I've been looking for the perfect INDEX MATCH function for hours. Just added an IFERROR to replace the #N/A.

Thanks!

Linn

thanks so much for this absoloutly cool Post!

Really Useful for me.

thanks again ;)

My goal is to rank from highest to lowest a subset of numbers from a column based on certain values. What is the best way to accomplish this, as I can't seem to get it right using index, match and rank in various ways.

Example:

Col A has divisions names A-G

Column B has the teams within each division 1-6 for each division

Column C has a total score

Column D to rank the teams with in each division, so I have a 1-6 ranking for each division

Any help would be appreciated.

Thanks!

I have a google spreadsheet that is generated from a google form. The form is filled out by admin each time a student is placed in ISS. The form puts information on the spreadsheet like student name, grade, offense, how many days of ISS assigned, and the dates the student is assigned to ISS (each date is a separate column with a max of 5 days/dates the student can be assigned). What I'm needing is for certain data from this spreadsheet to be pushed to another spreadsheet that's laid out by dates with about 15 rows under each date. I need to the students name to be pushed under the correct date(s) they were assigned. Therefore, making this second spreadsheet look like a list of students assigned ISS per day. This list is sent out so teachers can see which students of theirs (if any) are in ISS for that day. Is this possible? I created the first spreadsheet that's generated from the form/forms filled out to push students names into a google calendar under each day they are assigned (which I thought was pretty cool and provided the same effect as the list of students by date). However, admin doesn't "dig" the calendar view and wants the list in a spreadsheet form similar to what they are using. Which is the reason I am inquiring about how to make this work or if it's possible to make it happen.

Hello Amy,

I am sorry, I have very little experience with Google Spreadsheets and therefore am unable to help. They are very similar to Excel, but not identical.

Thanks for this highly informative article.

Which combination of Index, Match and Offset can I use to return rows with their contents?

Much thanks

Hello Anthony,

It depends on what exactly you want to get as the result : )

If you have a lookup table from where you want to return the entire row, then it is better to add a helper column to a master table and get the row number using the Match function. If you want to put data in different columns, then you can use the Index function. If you want to pass the values from the lookup table to some function, e.g. Sum, then you'd better use Offset.

Hi,

. Found the article very helpful and particularly this

…… "...... 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. "

……

Might just be worth noting that MATCH generally still has the 255 limit and the key to it working here in this particular formula:

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

is that The value passed to MATCH in those cases is simply TRUE which is matched against an array of booleans and therefore the 255 character limit for MATCH is immaterial. (Thanks to RoryA at MrExcel Forum for pointing that out to me)

. ( I got a bit confused later thinking that both INDEX and MATCH did not have the 255 limit

Thanks

Alan

Thank you for this valuable piece of information, Alan!

Hi, Thanks for the great article, just wondering if the Index Match formula could return a second column cell from the same row, e.g. finds search value on row 249 and returns values in column 5 and column 12

Hi Svetlana Cheusheva Madam,

Hope You doing Well, I have Face with a little problems.I am trying To solve it.but I can't .If you could kindly help me.

Sno_____Date_____Description_______Cr.__________Dr.________Total Balance

1. 30/10/14 Mike 3000 3000Cr

2. = Mike 500 2500Cr

3. = Mike 3000 -500Dr

If I draw The formula to below.then it must be an empty Cells to Bottom. when I enter the value & Information .Then to work Correctly ....

Thanks

Sno_____Date_____Description_______Cr.__________Dr.________Total Balance

1. 30/10/14 ________Mike__________3000______________________3000Cr

2.___= _____________Mike _______________________500_________2500Cr

3.___=______________Mike________________________3000________-500Dr

4.___=______________Mike__________5000______________________4500Cr

Dear Svetlana,

This is my first posting, though I used to get some excel guidance here.. Your feedback really helps me a lot!

I had a "seems to be" simple problem, but after trying for some formula attemps, I still couldn't get it right..

Here is how it look like:

Data Source:

111 112

D | C D | C

100 | 50 20 | 30

Search Engine:

D C

111 xxx yyy

I'm trying to make a simple "search engine", which, example.. when I put 111 on the search engine, it will "automatically" fill up the xxx & yyy with 100 & 50 from data source. So in this case there are 2 criterias that need to be obeyed by the formula. The "111" & the "D or C".

I've managed to get the "xxx" section right with this formula: =INDEX($D$14:$IU$14,MATCH(C18,$D$11:$IU$11,0),MATCH(A18,$D$10:$IU$10,0))

But as I used the same formula construction to the "yyy" section (by modifiying it to get the "C" part), it always appear "#Reff".. I don't know what's wrong with my formula's construction..

Can you please help me with this case Svetlana?

Thank you very much!

Sincerely yours,

Chris

=INDEX('1'!$A$9:$R$250,MATCH($A1,'1'!$A$9:$A$250,0),3)

In the above I want to change the sheet reference shown as '1' above to what is in another cell.

I have 10 sheets named 1 through to 10 in the workbook.

I have a drop down list from which the user can choose a number from 1 to 10 indicating which sheet to use. If they chose 10 I want the sheet number 10 to appear etc. The formula above is showing sheet name 1.

Hello Harvey,

You can use the INDIRECTfunction, the formula will be as follows:

=INDEX(INDIRECT(A1&"!$R$9:$R$250"),MATCH($A1,INDIRECT(A1&"!$A$9:$A$250"),0),3)

Where A1 is the cell from the drop-down list.

Hello,

Thank you for your great article.

I just used the Index Match Max Formula as per your examples, in order to get the person with the highest rank and it worked great when there is a unique person with the highest rank.

However, in some cases, two or more people have the highest rank, but the formula only returns one name.

Is it possible for the formula to return all the names of the people ranked one, or alternatively, have an error message if there are more than one result possible?

Example:

John 2

Bob 4

Will 4

David 3

=INDEX($B$2:$B$5, MATCH(MAX(C2:C5), C2:C5, 0))

The result is Bob, and I would like to have both Bob and Will.

Your help would be greatly appreciated.

Kind regards,

Marine

Hello Marine,

You can show an error message if there are at least two people with the highest rank:

=IF(LARGE(C2:C5,1)=LARGE(C2:C5,2),"error text", INDEX($B$2:$B$5, MATCH(MAX(C2:C5), C2:C5, 0)))

Thank you very much Svetlana.

Is there a way to return both people with the highest rank?

Kind regards,

Marine

Hello,

I want a solution for the following.

I have 3 columns namely "State" , "City" , "Assessment rate"

If i select a state , in city column it should load the cities of that particular state

and then in city list which i got after selecting the , in that list if we search for any particular city , it should display all cities matching to the search key work and it should also display the max assessment value of that city.. for ex

Output Required

State city assessment rate CitySearch MatchingCities MaxAssessmentRate

NY Manhattan 33.32 NEW West New York

West New York 35.45 East New York 42.16

East New York 42.16 south(New York)

south(New York) 28.69

Please Help me on this .. Thank you

Hello Shaan,

Please have a look at this post. If my understanding is correct, this is what you need:

https://www.ablebits.com/office-addins-blog/2014/09/30/dependent-cascading-dropdown-lists-excel/

Hello,

I have 2 tables:

table 1

BH151¦20.53

BH151¦20.5

BH152¦20.99

BH152¦21.99

Table 2

BH151 ¦20.01¦21.00¦X1

BH152 ¦20.01¦22.00¦X2

I would like a formula that looks for the value in table 1 and report the X value from table 2. The value it needs to check first is in the first column of table 1 and then find the value from the second column. This value must be in between value of column 2 and 3 of table 2 in order to report the X value (column 4 of table 2)

Many thanks,

i.e. I would like table 1 results to has follow:

BH151¦20.53¦X1

BH151¦20.5¦X1

BH152¦20.99¦X2

BH152¦21.99¦X2

Hi! Thanks for the very informative article!

I was wondering how you would alter the "Multiple Criteria Using INDEX MATCH" formula if, for instance, Dan Brown bought apples more than one time so there are repeats of names and what they bought, and you are only interested in the first time they bought apples. Thanks!

Please good you help with my formula.

I keep getting you've entered too many arguments for this function

=INDEX('Pivot by breachQH'!$A:$Z,MATCH($A$1,'Pivot by breachQH'!A:A,0),MATCH(B$4,'Pivot by breachQH'!$4:$4,0,MATCH("Majors-Lite",'Pivot by breachQH'!))))

Hi,

I want to compare two sheets sheet 1 and sheet 2,after comparing them both the sheets values inthe sheet should be merged and arranged in the ascending order.

can you please suggest me .

Thanks,

Hi,

For the example you showed on "Look up with multiple criteria using INDEX MATCH", what if my table's results are showed in horizontal instead of vertical? Is there any way I can make it look up and return the correct data without having to transpose the table? For example in the table below, I am trying to match the Lab and the Test and wanted it to return results for Test 1 for my first column and Test 2 for my second column. How do I make it to return the data in row 4 instead of column 3 like the example shown? Is there any way to achieve this? Thanks in advance!

Lab E Lab E Lab E Lab C Lab C Lab A

Ash Calcium Free L-CarnitineChlorideCobalt Copper

% % ppm % ppm ppm

Test #1 1.63 0.21 147.7 0.21 <0.20 4

Test #2 1.46 0.23 152.2 0.22 <0.20 4

Hi Angie,

When you are trying to match the Lab and the Test, do you have several Lab records for one Test? If you can send a sample workbook with your data to support@ablebits.com and include the result you expect to get, our support team will try to help.

how to find same value or number in excel

how to find same value or number in excel.

Hi there!

I have a worksheet with range (which is similar to a tax schedule) - Column A representing Minimum Value and Column B as Maximum values. Column C contains values if an amount is within the range of Column A and B. E.g.

Worksheet 1

Column A Column B Column C

1 100 50

101 200 75

201 300 100

Worksheet 2

78

220

115

What I would like is a formula/function to get the corresponding value from Column C in worksheet 1 if the value in worksheet 2 is within the Minimum and Maximum range from worksheet 1.

Thank you!

=INDEX(D2:D4,SUMPRODUCT(--(B7=B2:B4),ROW(A1:A3)))

A B C D

1 min max Output

2 1 100 50

3 101 200 75

4 201 300 100

Thank you for those explanations, you literally saved my life from hours and hours and more.. hours of work :o)

God bless you for giving us this explanation!

Hi

I've got a tricky one for you.

I've got a table with 5 columns. We've got various engineering disciplines - civil, mechanical, electrical etc. with various grades of engineers - senior, principal, technician etc. Each has a specific charge out rate for 3 different work locations. I want to link another work sheet and populate a row across the top using pull down lists so any of the 3 combinations on discipline, grade and office pops the right rate into the boxes so I can build up an estimate.

Any ideas?

Hi,

I have 2 rows

Type 1 6 6 1 2 3 7 8

Value 12 21 11 23 41 65 07 80

Enter 1

Result 12

Enter 6

Result 11

Enter 4

Result 12

Enter 9

Result 07

Basically I need to get the minimum value if the value matches or else minimum value of all the denominations that are lesser.

I would really appreciate f you can help me with this in any way.

Thanks got a way around :)

=INDEX(Sheet2!$A$2:$D$5049,MATCH(1,(BC2=Sheet2!$A$2:A5049) * (BD2=Sheet2!$B$2:B5049),0),4)

Sheet1 ( Column BE and BF needs to filled from Sheet2 matching the values in

Column BC and BD to A and B in sheet2)

BC BD BE BF

Bradbury 2560

BUSBY 2168

Sheet2

A B C D

BRADBURY 2560 -34.084468 150.829041

BUSBY 2168 -33.917587 150.899095

Its not working for me. Below is the formula is used

=INDEX(Sheet2!$A$2:$D$5049,MATCH(1,(BC2=Sheet2!$A$2:$A$5049) * (BD2=Sheet2!$B$2:$B$5049),0),3)

Hi Jag,

Your formula is correct, just use index 3 for column BE:

BE: =INDEX(Sheet2!$A$2:$D$5049,MATCH(1,(BC2=Sheet2!$A$2:A5049) * (BD2=Sheet2!$B$2:B5049),0),3)

BF: =INDEX(Sheet2!$A$2:$D$5049,MATCH(1,(BC2=Sheet2!$A$2:A5049) * (BD2=Sheet2!$B$2:B5049),0),4)

If you mean something different, please clarify.

FYI - MATCH does not work with lookup strings greater than 255 either (as of 2013).

It also returns a VALUE error.

Hi Svetlana!!

I need help with an excel file....I have 2 seperate files with similiar data....Phone #'s and Department #'s on one and Phone #'s on another.....I want to move the Depatment #'s to the 2nd file using the Phone # as matches.....what kind of formula can do this.....Thx Joe

Hello, I have been using the index/match formula for years to match data from multiple worksheets on a master sheet. However, after we updated to Excel 2013 the formula no longer works, I know I'm entering it in correctly but it does not return any data, no error code it just puts a 0 in the cell? Have you come across anyone else with this issue? And do you have any fixes for it?

thank you!

Svetlana, thank you for your article. I hope you can help with a related problem I'm having!

In my worksheet titled “Data!” I have the following successful formula:

=SUM(INDIRECT(CHAR(64+MATCH(E3,A3:N3,0))&MATCH($B165,$A$1:$A$900,0)&":"&(CHAR(64+MATCH(E3,A3:N3,0))&MATCH($B165,$A$1:$A$900,0)+$O$2-1)))

Please don't bother with the details, as my problem is related to referencing another spreadsheet, as explained below. But in sum, the above formula works as intended by summing cells E124 to E133. In cell E3 I have the desired column name. In B165 I have the desired year.

I need the formula to be in a different worksheet. So, in my second worksheet I’ve written:

=SUM(INDIRECT("Data!"&(CHAR(64+MATCH(Data!E3,Data!A3:N3,0))&MATCH($O3,Data!A1:A900,0)&":"&"Data!"&(CHAR(64+MATCH(Data!E3,Data!A3:N3,0)&MATCH($O$3,Data!A1:A900,0)))))

However, this brings me a #VALUE error.

When I break the formula into two parts it works.

That is, this works:

CHAR(64+MATCH(Data!E3,Data!A3:N3,0))&MATCH($O3,Data!A1:A900,0)

And this works:

(CHAR(64+MATCH(Data!E3,Data!A3:N3,0)&MATCH($O$3,Data!A1:A900,0)))

But when I combine the two it breaks down. I suppose that the error has to do with the first instance of "Data!" below where I reference my initial worksheet.

=SUM(INDIRECT("Data!"&(CHAR(64+MATCH(Data!E3,Data!A3:N3,0))&MATCH($O3,Data!A1:A900,0)&":"&(CHAR(64+MATCH(Data!E3,Data!A3:N3,0)&MATCH($O$3,Data!A1:A900,0))))))

Any guidance would be greatly appreciated!!

Hi Svetlana,

I was hoping that you might be able to help me with the functions to find the Max, Min and Average between two dates with a list of dates with data.

I cannot get the min function to work.

B C G H I J

2 1/01/2013 0:00 0.887 Max Min Ave

3 1/01/2013 0:00 0.952 1/01/2013 0:00 0.952 MIN(INDEX(($B$2:$B$50>=G3)*($B$2:B$50=G4)*($B$2:B$50=G3)*($B$2:B$50=G4)*($B$2:B$50<=G5)*$C$2:$C$50,))

5 1/01/2013 0:00 0.745 3/01/2013 0:00

6 1/01/2013 0:00 0.644 4/01/2013 0:00

7 1/01/2013 0:00 0.745

8 1/01/2013 0:00 0.845

9 1/01/2013 0:00 0.945

10 1/01/2013 0:00 0.845

11 1/01/2013 0:00 0.742

12 1/01/2013 0:00 0.842

13 1/01/2013 0:00 0.942

14 1/01/2013 0:00 0.842

15 1/01/2013 0:00 0.742

16 1/01/2013 0:00 0.642

17 1/01/2013 0:00 0.614

18 1/01/2013 0:00 0.542

19 1/01/2013 0:00 0.642

20 1/01/2013 0:00 0.542

21 1/01/2013 0:00 0.442

22 1/01/2013 0:00 0.341

23 1/01/2013 0:00 0.441

24 1/01/2013 0:00 0.541

25 1/01/2013 0:00 0.559

26 1/01/2013 0:00 0.550

27 1/01/2013 0:00 0.439

28 1/01/2013 0:00 0.339

29 1/01/2013 0:00 0.439

30 1/01/2013 0:00 0.539

31 1/01/2013 0:00 0.437

32 1/01/2013 0:00 0.336

33 1/01/2013 0:00 0.436

34 1/01/2013 0:00 0.536

35 2/01/2013 0:00 0.544

36 2/01/2013 0:00 0.433

37 2/01/2013 0:00 0.332

38 2/01/2013 0:00 0.432

Hi All

I just recently discovered and learnt to love VLOOKUP and now I read about an even more powerful function. However, the core problem for me remains that in the end we are looking for exact matches here. If one has to be searching on text this is a fairly unrealistic precondition.

We have about 41k company names in our database of which some are in relation with others while others are not. Also, we still have dirty data which complicates the issue even more. So we'd have:

"ABC Company Inc." (Main Seat)

"ABC Company Germany"

"ABC Company USA"

"ABC Company" (dirty data record, actually main seat)

"Company ABC" (totally different company)

Now those companies can participate on fairs. From the fairs we receive a table of names of companies who participate - from their database. So the naming for the exact same company will very likely be different. The table from the fair exhibitor features up to 5 columns that I need on my master table from my database. On the master table I have a full company name and a short name which does not include business entity type. Also, our master table has a column with the website and so does the fair exhibitor table.

I would say that if 2 out of 3 prerequisites match (From Name, Short Name & Website; using wildcards on both ends of the search strings) I could perform the Index lookup. I can still not be completely sure that the result is 100% accurate but it should reduce the manual labor afterwards.

Do you have any insights or best practice advices for a scenario like mine?

Best

Roger

Hi there,

Thank you for the excelent tutorial.

I have been using Index Match function with success for many years.

Now I have come up with a new issue. I would like the column num in the function to pick only the second (or third or fourth) line of a cell instead of all of the cell data. Is that doable ?

Thanks

Nick

Hi

I have a fleet of truck and want to manage daily expense on fuel my work is to dispatch goods from a depot to different centres

Hi Svetlana,

I am using the index/match function successfully, however I have a set of data that has the lookup value for the match function listed multiple times in the data set. Is there a way to choose the lookup value based on the value of the corresponding indexed data value. For example:

A B

1

Hi Svetlana,

I am using the index/match function successfully, however I have a set of data that has the lookup value for the match function listed multiple times in the data set. Is there a way to choose the lookup value based on the value of the corresponding indexed data value. For example:

A B

1 Joe

2 Bob

3 Joe

4 Sally

5 Joe

How would I get the function to return the value 5 from column A rather than 1?

Thanks,

Chris

Hi there,

how could I do multiply array match? Thanks very much!

25 is the value to match with the data set below:

a b c d e f g h

60 60 60 60 60 60 60 60

120 120 120 120 120 120 120 120

200 200 200 200 200 200 200 200

80 110 110 110 110 110 110 110

25 25 25 25 25 25 25 25

25 25 25 25 25 25 25 25

22 22 22 22 22 22 22 22

70 70 70 70 70 70 70 70

120 120 120 120 120 120 120 120

50 80 80 80 80 80 80 80

10 15 15 15 15 15 15 15

15 15 15 15 15 15 15 15

Regards,

Jana

Hi Svetlana,

Great post.

Using your dateset for the 'How to use INDEX MATCH to search by row and column values example', how could you answer the question:

"By what year was the population of USA >= 300,000,000?" The answer should be 2015.

Essentially I have a very similar data set and I want to output a column title value, with the row title and a specific value as input.

Thanks!

Hugh

I have two sheets with data that I need to match up in the following way:

Sheet 1:

Col A = Company name

Col B = Company address

Col C = Rent

Sheet 2:

Col A = Company name

Col B = Company address

The hard part is that on sheet 1 the list has different company names for the same address in multiple rows. Example:

ABC Inc, 123 Main St., $500

XYZ Inc, 456 Main Ave, $600

GHI Corp, 123 Main St, $550

I need to match the most recent (highest row number) or BOTH the company name and address with those on Sheet 2 and return the RENT from Sheet 1.

I have a feeling that this is going to require diving into VBA.

I have tried using INDEX and MATCH functions with helper columns but I can't get it to match BOTH cells.

Thanks

Hi Svetlana,

Need your expert help, I am new user to complex Excel functions as have never used anything beyond sum/average/max. I am trying to use Index/Match in a scenario where based on matching account in a cell, need to sum data from 12 months column in that row. similar to example you have given for Vlookup & sum function. But I am not able to figure out how to use it.

Is this correct Sumif?

=SUMIF(Trend!$A$6:$A$16,$J18,Trend!$C6:$N6)

It is giving only single cell value of Trend!$c6 instead of sum c6:n6

or I have to use Index/Match, if so then what will syntax?

Thanks in advance

regards

Piyush

I know it is silly.

Svetlana,

I think I have the formula correct for the Index/Match with multiple criteria, however I can't seem to make the { } register and execute the formula.

Running Excel 2010

{=INDEX([19122014.xlsx]Sheet2!$A$1:$N$24596, MATCH(1,(C3=[19122014.xlsx]Sheet2!$B$2:$B$24596) * (E3=[19122014.xlsx]Sheet2!$F$2:$F$24596),0),12)}

Please help.

liz

Hi Liz

I am new to this and was having the same issue. I believe you don't include the {} when typing in the formula and excel actually adds this in for you.

See 1:25 on this video http://www.businessinsider.com/excel-array-formulas-microsoft-2015-1

Hope this helps!

Hi,

Please can you advise how to solve with Index & Match for 2 rows & 1 column criteria as follows

Row ---- Employee Contribution

Row ---- Employer Contribution

Column --- Employee No.

Please advise how could I bring the values from data in another sheet using Index & Match or any other alternative function.

thanks and regards,

Santosh

Hi, Firstly, I thank you for providing this excellent service. You are doing a great service.I need some help with this. I want to send/link cells or rows to another worksheet/book when they meet certain criteria.

For example, if the date and time attended in column D and E is later than a day or 10 hrs compared to column B and C and link those data that match criteria to another sheet.

Thank you and hope to hear from you soon.

Hi,

I would like your assistance in understanding the use of INDEX MATCH.

I have two sets of data.One has NAME, ACCOUNT NUMBER, ID NUMBER and EMPLOYEE NAME.

The other has NAME, ID NUMBER and EMPLOYEE name.

I need to match the names and then I get the corresponding account numbers.

you have your MIN and MAX examples backwards...right?

Wondering if you can help. I have a data set that lists dates / Sales person names and email addresses they acquired - among a slew of other data. I want to use a formula to create a list of the emails captured by an individual salesperson on a given day (of which there will be many). Example: reference a date: 1/21/15 and a salesperson: John Smith and get a list of the emails for that date. Rinse and repeat for additional sales staff. ideas?

hey, i don't know what formula in excel to be use. this is the data.

A1-CODE B1-ITEM

A2-SWOO1 B2-SWEATER

A3-JK001 B3-JACKET

A4-PN001 B4-PANTS

A5-SW002 B5-SWEATER

A6-JK002 B6-JACKET

A7-PN002 B7-PANTS

A8-SW003 B8-SWEATER

A9-JK003 B9-JACKET

A10-PN003 B10-PANTS

Hi

how can i have sorted data from large data bank in a different sheet. for example -

Date name collection $

1/01 A 100

1/01 B 50

2/01 c 200

2/01 D 20

02/01 A 40

03/01 A 100... and so on...

say this is my data sheet. now i want to make a different sheet knowing what is collection detail of A. how can i have result like following in a different sheet-

01/01 100

02/01 40

03/01 100... like this.

Please help me providing your valuable comment. Thanx in advance...

Hello Rony,

The best approach is using a pivot table. Just add the Name column to the Filters group, Date column to the Rows group, and

"collection $" column to the Values group.

You can find more information in our PivotTable tutorial.

Hi Svetlana,

Hoping you can help me with this. I have 4 columns: Action, target date, start date, completion date. In a new table, I would like to have 5 cells in a column show the 5 text entries from the Action column that corresponding to the earliest target dates that have blank completion date cells, and have these listed in ascending date order. To the right of this 5-cell column, I would like to have the target dates corresponding to each of these actions appear. I'm not sure how to combine all of the logic elements, including having the dates recognized. I'd love some help! Thank you,

Miranda

Hello Miranda,

Please send a small sample workbook with your source data to support@ablebits.com and include the result you expect to get. Our support team will look into your task and try to help.

I'm having trouble get an "and" statement to work. I have the existing formula

=IF(ISNUMBER(SEARCH("-08",B562)),139,IF(ISNUMBER(SEARCH("-11-",B562)),139,IF(ISNUMBER(SEARCH("-15-",B562)),139,IF(ISNUMBER(SEARCH("-20-",B562)),139,IF(ISNUMBER(SEARCH("-30-",B562)),159)))))

But I need to see if that same source cell has a "P" included. If so then the above values would apply and if the value in the source cell is "S" then a different value would apply.

If I understand your task correctly, then please use the formula below:

=IF( OR(ISNUMBER(SEARCH("-08",B562)), ISNUMBER(SEARCH("-11-",B562)), ISNUMBER(SEARCH("-15-",B562)), ISNUMBER(SEARCH("-20-",B562)), ISNUMBER(SEARCH("-30-",B562)) ), IF( ISNUMBER(SEARCH("P",B562)), 139, IF(ISNUMBER(SEARCH("S",B562)), 999, 555)), 159)

The result will be as follows:

139 – the cell contains at least one value from this list: "-08", "-11-", "-15-", "-20-", "-30-" AND contains "P"

999 – the cell contains at least one value from this list: "-08", "-11-", "-15-", "-20-", "-30-" AND contains "S"

555 – the cell contains at least one value from this list: "-08", "-11-", "-15-", "-20-", "-30-", but does not contain "S" or "P"

159 – the cell contains nothing from this list: "-08", "-11-", "-15-", "-20-", "-30-" AND contains "P"

Hi,

i have two cell which is created time & date in one cell & next cell i have closed time and date, in this scenario i would required your help to count only working hours which 8:00 AM to 8:00 PM excluding sundays we required number of hours has been taken to closed the case excluding non working hours & sunday, please help.

I have a large spreadsheet that I audit monthly with customer transactions. I want to make sure a customer didn't have a second loan open before the previous loan was paid. The customer could have 5 loans on the spreadhsheet; I want to make sure that no customer loans overlap. Each customer will have their own ID number and each loan is one row of data. For example, John Doe gets a loan on 10/2/12 and it's paid off on 10/31/12, but gets another loan on 10/30/12. The second loan was done before the first loan was paid. There could be a 100,000 rows of transaction. Can you help with a formula?

Hi,

I have several tables with prices of different flights.

Different tables range from Airline1 - Adult rates, Airline 1 - Child rates, Airline 2 - Adult rates, Airline 2 - Child rates, and so on.

Now, the above doesn't seem to work as mine actually looks more like a distances table, with prices going horizontally and vertically.

So really I need to have an Index/Match formula but which knows how to choose from which table according to criteria you need.

For instance:

Airline 3 - Child rates- Mumbasa - Cairo - Result, each of these variables in a different column.

Can you help ?

Thanks in Advance.

Hi, I read the article - first off - terrific and incredibly helpful.

However, I do have a question that was not addressed.

I have a table (with headers) in J4:O15.

J5:J15 is vendor name, K4:O4 is item name. Data is K5:O15.

I have been trying multiple ways with MAX, INDEX, and MATCH to have a cell return both the Vendor and the Product based on the MAX function tried against K5:O15.

Is there a way to nest MAX with Match that I haven't understood?

TIA

Is there a way to use index-match like this vlookup fomula:

=IFERROR(VLOOKUP([Site ID],‘P:\Dropbox\Data Control Systems\[PROPERTY DETAIL SHEET MASTER.xlsm]Main_Frame_Table,COLUMN(Main_Frame_Table[CLIENT STATUS ACTIVE INACTIVE]),FALSE),"")

I would want to lookup a data from another folder.

Dear,

I am working in a transport company so i have to keep trips record up to date with the trucks numbers.so many times i have used your published formulas.

Now i need a formula to show the trucks in separate sheets "loaded & unloaded" only to put the loading and unloading dates.

if you will see, i can send you the file

Brilliant explanations, thank you.

I keep getting a #N/A error.

I tried VLOOKUP and MATCH and it returned results but only after checking 64 cells.

=VLOOKUP(U4, 'Sheet1'!$A$1:$E$79, MATCH(T4,'Sheet1!A$1:E$1, 0), FALSE)

So then I went to INDEX MATCH and still returning #N/A

I have a Volume and MarketShare that need to be looked up and a dollar amount that needs to be returned.

The grid is on another sheet...

=INDEX('Sheet1'!A1:E79,MATCH(U4,'Sheet1'!$A$1:$E$79,MATCH(T4,'Sheet1'!$A$1:$E$1,0)))

What am I doing wrong?

There is an IF(AND) statement attached to the T column but like I said it was not a problem when I used VLOOKUP

Thank you in advance

Hi

How to get the year from the example "How to use INDEX MATCH to search by row and column values" ?

I would like to have the year 2015 on the header as a return value when looking for the number 321,225.

We have a pricelist that looks like this, each section is a drop down - so thickness and height has multiple selection and select no required has 8 off, 12 off, 24 off, 50 off, 150 off. I want to somehow when the customer selects each thing they want in the two cells it returns the price.

SELECT THICKNESS & HEIGHT

75 x 75 x 3 x 4M

SELECT N0. REQUIRED

8off

PRICE

No Product Price

8off 75 x 75 x 3 x 4M 147.63

12 off 75 x 75 x 3 x 4M 146.33

24 off 75 x 75 x 3 x 4M 145.03

50 off 75 x 75 x 3 x 4M 144.35

150 off 75 x 75 x 3 x 4M 143.94

Can anyone help? Thanks

Thanks a lot!

REGARDING: Look up with multiple criteria using INDEX MATCH

Your formula on 2 criteria works but to check that i understand WHY it works recreated your example in my Excel 2010 and I entered in a separate cell:

={(A2='Lookup table'!$A$2:$A$13)}

expecting it to evaluate to 1 or TRUE. However it evaluates to FALSE so although your overall formula works it shouldn't? both of the tests need to evaluate to 1 for it to find a match (zero * anything is zero or FALSE?)

Can anybody shed light on this?

I am also experiencing the same thing and using Excel 2010. Could this be an Excel 2010 issue?

Great! Index Match with your explanatory examples - solved my excel issues. Thank you!

Hi!

I wanna know how to detect a label and copy all the data column from the label detected I have something like that...

sorry but I don`t have any idea to do it .-.

A B C D

1 vvcf vvcvc vcfvdf Icfgg

2 0 -0.25 0.48 -0.11

3 0 -0.25 0.48 -0.11

4 0 -0.25 0.48 -0.11

5 0 -0.25 0.48 -0.11

6 0 -0.25 0.48 -0.1

7 0 -0.25 0.48 -0.11

Data range is given below. I am looking for formula while helps me

in looking up name against same value.

Data Range:

B2:B4 C2:C4

John 1

George 2

Stephen 2

Where Required:

B7:B9 C7:C9

1 ?

2 ?

2 ?

A

1

2

3

4

5

A B C D Result

a 1 2 3 1

b 1 4 3 1

c 4 5 6 4

I want to check the horizontal values with the vertical values, at least one match is enough

Hi

I am trying to use the INDEX MATCH function with multiple match criteria but wanting to also to use the Match Type 1. Here's my attempt

INDEX([Rate],MATCH(1,([From Ccy]=$F3)*([To Ccy]=$G3)*(Date]=$H3),1)

I have a table with columns [Date], [From Ccy], [To Ccy] and [Rate]

I'm trying to retrieve an FX rate for a particular [From Ccy] matching F3 and [To Ccy] matching G3, getting the [Rate] from the row with the largest [Date] less than or equal to H3.

If I put the ([Date]<=$H3 then it retrieves the first row it finds, not the largest but less than or =

Any ideas ?

Hi,

the value that i try to match is the combination of text,-(hyphen) and number, eg. www-f-111. I noticed that they only match the www and return a result.

Anyway that my match criteria included text, hyphen and number?

Thanks in advanced.

Put "" around it. So use "www-f-111"

HI,

=IF(AND(D54>=35,E54>=35,F54>=35,G54>=35,H54>=35,I54>=35),"PASS","FAIL")

THIS IS THE FORMULA FOR DISPLAY PASS OR FAIL STUDENTS IN THE LIST. SO I WANT TO KNOW THAT, CAN WE USE THE CELLRANGE INSTEAD ONE BY ONE.

HELP ME.

I required solution while choosing motor rating which is standard as per their kw rating. I am doing pump calculation & finally I am getting certain value. e.g. after pump calculation I am getting 2.3kW rating. But as per manufacturer standards I nned to select one size higher motro from following column as below. For my case the selection should be 3kW.

KW

1.1

1.5

2.2

3.0

3.7

Please suggest

how to match similar amount in different coloum different row

Hi.! Guys.,

I made one time table using Vlookup, conditional formatting and some other functions.... Now i want to show the names of those employees who are on leave (sick leave, anual leave etc...) in remarks cell.

Any one can help me in this tegard.???

Thanks in advance .......

Hi guys.,

I need ur help.... I made 1 time table, now i want to show the names of employees who are on leave in remarks column when i put "L" in corresponding cell...

Thank in advance

I have a registration/attendance form which contains list of people that attended the the occasion from day1 through day 5. If anyone attended or missed any day, I put "P" for present or "A" for Absent under the each day i.e Day1 Day2 Day3 Day4 Day5

P A P P P

Now, I want to find for each day, the list of people with "P". I used this formula: =INDEX(Registration!B10:B159,MATCH("P",Registration!N10:N159,0))

On the first list for Day1, the first person (Row 1) registered was present, the second person (Row 2) was absent, the third person (Row 3) was present, and so on. Upon using the above formula, I got the name of the 1st person who was present, it skipped the 2nd person since he was absent but it put the name of the 3rd person in the 2nd and 3rd row. That is:

Larry

Daniel

Daniel

I want the formula, first not to repeat names, but to skip to next as long as the person is absent. I need help.

Thank you.

Hi there, I really appriciate if you help me on vlookup on double values. I have purcasing # in one column and second column I have codes or numbers e.g., 30,20, 10 in a repetive way. I have to vlookup for anohter table that has purchasing # and codes and vlookup the 5th column that has comments. So I have to match purchasing # and code to other table and vlookup comments column.

Hopefully i am clear.

Ex:

Purchacing # 1234567 code 20

other table has the same data:

Purchasing # 9876543 code 20 comments(column)

Could you please kindly help to come up with formula.

I inserted helping formula but I would like to use different formula without inserting any column. Plus I have a big data and vlookup can do up to 250 cells.

You can concatenate the two columns on both spreadsheets directly to the left and do your match that way - I hope this comes across clear. If not, you can email me and I can send you my spreadsheet or modify yours

spreadsheet1 spreadsheet 2

'=VLOOKUP(J65&K65,$O$65:$R$67,4,FALSE) '=+S65&T65

abc 10 test abc10 abc 10 test

abcx 20 1 abcx20 abcx 20 1

abc 30 three abc30 abc 30 three

I have four columns of criteria. Some rows have four cells of criteria but some have only three. My formula is: INDEX(Fb,MATCH(1,INDEX((A4=SYSTEM)*(B4=SPECIE)*(C4=SIZE)*(D4=GRADE),0),0)). This works well as long as the row containing the match has criteria in all four cells but it fails when the correct match is in a row containing a blank cell. I need a method which will treat a blank cell as a match.

I have 3 columns of data.

Column 1 - Vendor

Column 2 - Items

Column 3 - Price

Data would look like this:

Vendor A Item A Price $1.00

Vendor B Item A Price $1.05

Vendor C Item A Price $1.10

Vendor D Item A Price $1.15

Vendor A Item B Price $0.50

etc

It's a straight data dump from SAP; basically in column 4 (detailed as listed above) would be the formula that I'd like to find the min price for Item A (Data is in reality scattered throughout 1000+ lines and not next to each other.

I was think a index/match/min formula to capture this but I can't figure the formula; any help would be appreciated!

Thanks for the valuable information.

SHEET 1

A B

DATE NO.

01-May-10 R/RES-105255

02-Apr-14 R/RL-813301

21-Jul-10 R/RES-148991

02-Apr-14 R/RL-813301

27-Oct-12 R/RL-557675

21-Jul-10 R/RES-148991

23-Jul-09 R/RES-100983

30-Sep-12 R/RL-614014

27-Mar-15 R/RL-574613

27-Mar-15 R/RL-574563

01-Jan-09 R/NN-53444

04-Mar-15 R/RL-950289

05-Feb-14 R/RES-100983

01-Jan-09 R/NN-70988

30-Sep-12 R/RL-614014

30-Mar-15 R/RL-616791

05-Jun-13 R/RL-610994

11-May-11 R/RL-143811

16-Feb-14 R/RL-824415

01-Jan-09 R/NN-109879

09-Nov-11 R/RES-30872

01-Aug-13 R/RL-707247

19-Jun-13 R/RL-727757

SHEET 2

A

NO.

R/RES-105255

R/RL-813301

R/RES-148991

R/RL-813301

R/RL-557675

R/RES-148991

R/RES-100983

R/RL-614014

R/RL-574613

R/RL-574563

R/NN-53444

R/RL-950289

R/RES-100983

R/NN-70988

R/RL-614014

R/RL-616791

R/RL-610994

R/RL-143811

R/RL-824415

R/NN-109879

R/RES-30872

R/RL-707247

R/RL-727757

I WANT TO GET EARLIEST DATE IN SHEET2 COLUMN B FOR EVERY CELL WITH THE HELP OF SHEET 1

please anybody resolve my problem.

I have been practicing the formulas that (Look Up with Multiple Criteria Using Index/Match and Vlookup. and I have learned other two ways to lookup using index and match:

=INDEX(Table9[[Customer]:[Qty.]],MATCH(1,((Table9[Customer]=B14)*(Table9[Product]=B15)),0),3) >Yours.

=INDEX(Table9[[Customer]:[Qty.]],MATCH(B14&B15,Table9[Customer]&Table9[Product],0),3) _ Index/Match with &

and using nested If function:

=INDEX(Table9[[Customer]:[Qty.]],MATCH(B14,IF(B15=Table9[Product],Table9[Customer]),0),3)

and the vlookup function with &:

=VLOOKUP(B14&" "&B15,Table9,4,FALSE)

these 3 formulas give the same results and I just want to share them.

)))

thank you for your time you put on explaining excel.

my best wishes.

A B C D E F G H

1 X AXN Ali 11.11 AXX Ahmed 10.19

2 X AXT Hassan 13.19 AX9 Brian 11.11

3 Y AXX Ahmed 10.19 AXP Shah 0.0

4 Y AX9 Brian 11.11 AXN Ali 11.11

5 Y AXP Shah 0.0 AXT Hassan 13.19

Please help:

Compare the value from Column "F" with Column "C" and on perfect match paste the corresponding average from Column "E" to Column "H". For example: AXX (F1) matches with C3 where the corresponding average is 10.19 and auto pastes it to last column i.e. H (H1)

Thanks for the article which is a very helpful introduction into using index/match.

One of the most interesting use cases (for me) is (or would be) using this index/match for looking up data in a (MS Excel) TABLE that resides not in the same, but in a different work book.

I have played around with this and achieved some results, but also found that data is not refreshed and/or even not found anymore when the data in the table changes. My first question would be "what is the right syntax to use? and do I need a 2-way index/match for this or not"? So making up a simple example to illustrate:

My workbook with the table holding the data is called 'CustomerFile.xlsx'. The table is located in tab sheet 'customers' and is called 'Table_Customer'. The columns on the table are: 'Customer ID' and 'Customer Name'. The table has two rows:

Customer ID Customer Name

-------------------------

1 John

2 Marc

My workbook into which the result should be pulled is called 'CustomerRpt.xlsx'.

So what formula would I be using to get the name of customer with ID 1 WHEN SPECIFICALLY WANTING TO USE TABLE AND COLUMN NAMES (rather than column references like $A:$A).

=INDEX ('CustomerFile.xlsx'!Table_Customer[Customer Name], Match(1, 'CustomerFile.xlsx'!Table_Customer[Customer ID],0))

OR

=INDEX ('CustomerFile.xlsx'!Table_Customer[#Data], Match(1, 'CustomerFile.xlsx'!Table_Customer[Customer ID],0), Match("Customer Name", 'CustomerFile.xlsx'!Table_Customer[#Headers],0))

My second question would be: "Any idea why sometimes a correct result is only returned when re-typing the complete formula from scratch?" Note: I am re-tying the EXACT same formula. I am aware the workbook with the source data needs to be open and I have tried refresh/refresh all, formula automatic refresh turned on, saving the file and coming back in, editing link and update values, but only retyping the formula brought back the correct result! So is there any caching going on?

Thanks

found the answer to my second question - it was my fault - had closed parenthesis in the wong place - so while formula was syntactically ok, it returned a wrong result.

Hi,

I am trying to return multiple values using multiple lookup values. I have a range of lookup values, and I need to list the information from another sheet for each instances the any one of those lookup values appears on my data sheet. Suppose I had X,Y,Z for lookups, and I multiple data points for X,Y,Z on a another sheet. I need to create a single list that will show each entry that appears on the second sheet for any of X,Y,or Z. My current formula is:

=IF(ISERROR(INDEX(Data!$A$1:$E$10000,SMALL(IF(Data!$D$1:$D$10000=Formulas!$A$2,ROW(Data!$A$1:$E$10000)),ROW(Data!1:1)),1)),"",INDEX(Data!$A$1:$E$10000,SMALL(IF(Data!$D$1:$D$10000=Formulas!$A$2,ROW(Data!$A$1:$E$10000)),ROW(Data!1:1)),1))

That works fine, except that I have a list of 34 lookups in addition to Formulas!$A$2. Currently, it will only give me all the entries for the first lookup in my list. I can't figure out how to list the entries for the first lookup, then the second, etc.

Thanks for any help you can provide.

Example:

A B A+B Up-to-date

1.00 2.00 3.00 3.00

How can it be possible in the fourth cell to remain the value 3 even after editing A & B Cell Value as well as yield previous sum-total + Current sum-total effect in the same fourth cell.

Say, if I delete the value 1 & 2 from A & B; A+B can be 0 but Up-to-date value will show 3 and again if I put 2 in A & 3 in B; A+B = 5 but Up-to-date value have to be 8

A B A+B Up-to-date

2.00 3.00 5.00 8.00

No manual operation except putting value in A & B Cell rest are linked by formula. Please Help..

Q column A contains a series of data from 1 up to 100 numbers, while column B have data 1 upto 150 numbers but two times.compare A and B column then hilight matching ones. Thanks 4 ur comments

Hello,

I am trying write a function to count the number of unique values in one column that fall in a category in another column.

Here is a simplified example of my data:

Order Qty Group

1 1 1

2 2 1

3 1 1

4 4 1

5 5 2

6 8 2

7 2 2

8 4 2

9 6 2

I want to know how many different/unique order quantities there are within group 1, group 2, etc but without designating the cell range, just the particular value (1 or 2 in this case).

Thanks so much!

I am trying to create a spreadsheet where it will put a value from a table depending on the code entered and name of insurance provider. Would this be the best tool to use?

In the first paragraph below #index-match-basics, where is says "a combination of INDEX and VLOOKUP functions", I believe you meant "a combination of INDEX and MATCH functions".

Hi Hank,

Spot on :) Thanks very much, fixed!

In the table under #calculations-index-match, you refer to a function that gets the row number of the maximum value as one that gets the row number of the minimum value and vice versa. Also, near the top of the page, you refer to "MATCH(lookup_value, lookup_array, [match_type])" as the syntax of the INDEX function.

I did not realize there were so many "bugs" in this post. I should probably find a good proofreader... Thanks again for pointing out those errors for me.

Hi Svetlana,

How can I use the INDEX and MATCH with a four dimensional look up (3 Vertical and 1 horizontal)? I tried extending the two dimensional example and it did not work.

For Eg:

January February March April

Leather Black Big Bag 100 200 300 400

Leather Red Small Bag 200 300 400 500

Leather Green Big Bag 300 400 500 600

Leather Yellow Small Bag 400 500 600 700

Cotton Black Big Bag 500 600 700 800

Cotton Red Small Bag 600 700 800 900

Cotton Green Big Bag 700 800 900 1000

Cotton Yellow Small Bag 800 900 1000 1100

i want to write a formula to look up the value for the following :

Cotton Green Big Bag January

Cotton Red Small Bag March

Leather Yellow Small Bag February

Request your help please

Dear Sir,

I am trying to find value and display in answer columns but we are not success. please guide me.

see the table.

Sir I hope you reply as early as possible.

Inst_Code course_code Vacant Inst_Code Course_Code Vacant Answer

4 16 1 4 16 1 1

4 16 1 4 16 1 1

4 16 3 4 17 3 #REF!

4 16 2 4 17 2 #REF!

4 17 2 4 23 2 #REF!

4 17 1 4 29 1 #REF!

4 22 1 4 30 1 #N/A

4 22 1 4 22 5 #REF!

4 23 3 4 17 6 #REF!

4 28 2 4 17 2 #REF!

4 28 2 4 30 3 #N/A

4 29 1 4 29 4 #REF!

{=INDEX($A$2:$C$2,MATCH(1,(E2=$A$2:$A$13)*(F2=$B$2:$B$13),0),3)}

Sir, I request you please reply as early as possible.

Thanking you,

Binoy

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.

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.

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 ?

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

Thanks :)

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

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.

Can someone please help me with this?

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

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

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

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.

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.

Very helpful, thank you!!

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),"")

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.

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.

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

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.

Hi,

Please help..

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

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

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

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

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.

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.

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

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

Thanks anyway

Carlos

Can I return the value "" using this formula

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

Thanks

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,

To be able to assist you better please describe your task in more detail.

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!

Hi chris,

Please look at the following article, it should help:

https://support.office.com/en-us/article/Fill-data-automatically-in-worksheet-cells-74e31bdd-d993-45da-aa82-35a236c5b5db

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)

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%

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.

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.

Hello Svetlana,

Your tutorial is absolutely great. Thank you very much.

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:

1. Add the additional column G in your table with the following formula:

=IF(COUNTIF(A2:A13, "="&A2) = 1, A2, "")

Now you have only unique values for column A in column G.

2. Add the additional columns with the following formulas:

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

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,

Please show us how your data looks like.

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.

Please help, Thanks

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.

Hi Svetlana,

I need your help.

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.

INDEX(N3:N416,MATCH("Anuradhapura",M3:M416,0))

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

please help me to overcome this problem.

Hi Roshan,

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

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

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!

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

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 .

please .

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

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

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.

Please advise if we have any mechanism to achieve this. Thanks for your inouts in advance.

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

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

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 have spreadsheet A and spreadsheet B.

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.

USEFUL

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.

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

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?

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.

Can you help me please?

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

Many thanks in advance!

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?

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

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 Advil

222 ibuprofen

222 Motrin

333 Advair

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

222 Advil, ibuprofen, Motrin

333 Advair

444 amoxicillin, Amoxil

555 APAP, Tylenol, acetaminophen

666 Vimovo

Thank You,

Reba

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 ?

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. :)

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

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