*This tutorial shows how to use INDEX and MATCH in Excel and how it is better than VLOOKUP. *

In a couple of recent articles, we made a good effort to explain the basics of 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 may wonder. Because VLOOKUP has numerous limitations that can prevent you from getting the desired result in many situations. On the other hand, the INDEX MATCH combination is more flexible and has many awesome features that make it superior to VLOOKUP in many respects.

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

### INDEX function - 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**- 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.

For more information, please see Excel INDEX function.

And here is an example of the INDEX formula in its simplest form:

`=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's where the MATCH function comes in handy.

### MATCH function - 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.

The syntax of the MATCH function is as follows:

**lookup_value**- the number or text value you are looking for.**lookup_array**- a range of cells being searched.**match_type**- specifies whether to return an exact match or the nearest match:- 1 or omitted (default) - approximate match (next smaller).
- 0 - exact match. In the INDEX / MATCH combination, you almost always need an exact match, so you set the third argument of your MATCH function to 0.
- -1 - approximate match (next larger).

For example, if the range B1:B3 contains the values "New-York", "Paris", "London", the below formula returns the number 3, because "London" is the third entry in the range:

`=MATCH("London",B1:B3,0)`

For more information, please see Excel MATCH function.

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. row and column numbers) is exactly what you need to supply to the *row_num* and *column_num* arguments of the INDEX function. As you remember, Excel INDEX can find 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, I believe it has already started making sense how MATCH and INDEX work together. In a nutshell, INDEX finds the lookup value by column and row numbers, and MATCH provides those numbers. That's it!

For vertical lookup, you use the MATCH function only to determine the row number and supply the column range directly to INDEX:

*column to return a value from*, MATCH(

*lookup value*,

*column to look up against*, 0))

Still having difficulties to figure that out? It might be easier to understand from an example. Suppose you have a list of national capitals and their population:

To find the population of a certain capital, say the capital of Japan, use the following INDEX MATCH formula:

`=INDEX(C2:C10, MATCH("Japan", A2:A10, 0))`

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

- The MATCH function searches for the lookup value "Japan" in the range A2:A10, and returns the number 3, because "Japan" is third in the lookup array.
- The row number goes directly to the
*row_num*argument of INDEX instructing it to return a value from that row.

So, the above formula turns into a simple INDEX(C2:C,3) that says to search in cells C2 through C10 and pull the value from the 3^{rd} cell in that range, i.e. C4 because we start counting from the second row.

Don't want to hardcode the city in the formula? Input it in some cell, say F1, supply the cell reference to MATCH, and you will get a dynamic lookup formula:

`=INDEX(C2:C10, MATCH(F1,A2:A10,0))`

**Important note!** The number of rows in the *array* argument of INDEX should match the number of rows in the *lookup_array* argument of MATCH, otherwise the formula will produce an 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 MATCH INDEX?

`=VLOOKUP(F1, A2:C10, 3, FALSE)`

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 this combination that easily copes with many complex scenarios when VLOOKUP stumbles.

Tips:

- In Excel 365 and Excel 2021, you can use a more modern INDEX XMATCH formula.
- For Google Sheets, see formula examples with INDEX MATCH in this article.

## INDEX MATCH vs. VLOOKUP

When deciding which function to use for vertical lookups, most Excel gurus agree that INDEX MATCH is far better than VLOOKUP. However, many people still stay with VLOOKUP, firstly, because it's simpler and, secondly, because they do not fully understand all benefits of using the INDEX MATCH formula in Excel. Without such understanding no one is willing to invest their time to learn a more complex syntax.

Below, I will point out the key advantages of MATCH INDEX over VLOOKUP, and you decide whether it's a worthy addition to your Excel arsenal.

### 4 main reasons to use INDEX MATCH instead of VLOOKUP

**Right to left lookup.**As any educated user knows, VLOOKUP cannot look to its left, meaning your lookup value should always reside in the leftmost column of the table. INDEX MATCH can do left lookup with ease! The following example shows it in action: How to Vlookup a value to the left in Excel.**Insert or delete columns safely.**VLOOKUP formulas get broken or delivers incorrect results when a new column is deleted from or added to a lookup table because VLOOKUP's syntax requires specifying the index number of the column you want to pull the data from. Naturally, when you add or delete columns, the index number changes.With INDEX MATCH, you specify the return column range, not an index number. As the result, you are free to insert and remove as many columns as you want without worrying about updating every associated formula.

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

To discover the nuanced differences between INDEX MATCH and XLOOKUP, explore the in-depth analysis in this guide: Excel XLOOKUP vs INDEX MATCH.

## Excel INDEX MATCH - formula examples

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

### INDEX MATCH formula to look up from right to left

As already mentioned, VLOOKUP cannot look at its left. So, unless your lookup values are is the leftmost column, there's no chance that a Vlookup formula will bring you the result you want. The INDEX MATCH function in Excel is more versatile and does not really care where the lookup and return columns are located.

For this example, we will add the Rank column to the left of our sample table and try to figure out how the Russian capital, Moscow, ranks in terms of population.

With the lookup value in G1, use the following formula to search in C2:C10 and return a corresponding value from A2:A10:

`=INDEX(A2:A10,MATCH(G1,C2:C10,0))`

Tip. If you plan to use your INDEX MATCH formula for more than one cell, be sure to lock both ranges with absolute cell references (like $A$2:$A$10 and $C$2:4C$10) so they won't get distorted when copying the formula.

### INDEX MATCH MATCH to search in rows and columns

In the above examples, we used INDEX MATCH as the replacement for classic VLOOKUP to return a value from a predefined one-column range. But what if you need to look up in multiple rows and columns? In other words, what if you want to perform the so-called *matrix* or *two-way* lookup?

This may sound tricky, but the formula is very similar to the basic Excel INDEX MATCH function, with just one difference. Guess what?

Simply, use two MATCH functions – one to get a row number and the other to get a column number. And I congratulate those of you who have guessed right :)

*vlookup value*,

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

*hlookup value*,

*row to look up against*, 0))

And now, please take a look at the below table and let's build an INDEX MATCH MATCH formula to find the population (in millions) in a given country for a given year.

With the target country in G1 (vlookup value) and the target year in G2 (hlookup value), the formula takes this shape:

`=INDEX(B2:D11, MATCH(G1,A2:A11,0), MATCH(G2,B1:D1,0))`

#### How this formula works

Whenever you need to understand a complex Excel formula, break it down into smaller parts and see what each individual function does:

`MATCH(G1,A2:A11,0)`

– searches through A2:A11 for the value in cell G1 ("China") and returns its position, which is 2.

`MATCH(G2,B1:D1,0))`

– searches through B1:D1 to get the position of the value in cell G2 ("2015"), which is 3.

The above row and column numbers go to the corresponding arguments of the INDEX function:

`INDEX(B2:D11, 2, 3)`

As the result, you get a value at the intersection of the 2nd row and 3rd column in the range B2:D11, which is the value in cell D3. Easy? Yep!

### Excel INDEX MATCH to look up multiple criteria

If you had a chance to read our Excel VLOOKUP tutorial, you have probably already tested a formula to Vlookup with multiple criteria. However, a significant limitation of that approach is the necessity to add a helper column. The good news is that Excel's INDEX MATCH function can look up with two or more criteria too, without modifying or restructuring your source data!

Here's the generic INDEX MATCH formula with multiple criteria:

*return_range*, MATCH(1, (

*criteria1*=

*range1*) * (

*criteria2*=

*range2*), 0))}

Note. This is an array formula that must be completed with the Ctrl + Shift + Enter shortcut.

In the sample table below, supposing you want to find the amount based on 2 criteria, *Customer* and *Product*.

The following INDEX MATCH formula works a treat:

`=INDEX(C2:C10, MATCH(1, (F1=A2:A10) * (F2=B2:B10), 0))`

Where C2:C10 is the range to return a value from, F1 is criteria1, A2:A10 is the range to compare against criteria1, F2 is criteria 2, and B2:B10 is the range to compare against criteria2.

Remember to enter the formula correctly by pressing Ctrl + Shift + Enter, and Excel will automatically enclose it curly brackets as shown in the screenshot:

If you'd rather not use array formulas in your worksheets, add one more INDEX function to the formula and complete it with a usual Enter hit:

#### How these formulas work

The formulas use the same approach as the basic INDEX MATCH function that looks through a single column. To evaluate multiple criteria, you create two or more arrays of TRUE and FALSE values that represent matches and non-matches for each individual criterion, and then multiply the corresponding elements of these arrays. The multiplication operation converts TRUE and FALSE into 1 and 0, respectively, and produces an array where 1's correspond to rows that match all the criteria. The MATCH function with a lookup value of 1 finds the first "1" in the array and passes its position to INDEX, which returns a value in this row from the specified column.

The non-array formula relies on the ability of the INDEX function to handle arrays natively. The second INDEX is configured with 0 *row_num* so that it will pass the entire column array to MATCH.

That is a high-level explanation of the formula's logic. For full details, please see Excel INDEX MATCH with multiple criteria.

### Excel INDEX MATCH with AVERAGE, MAX, MIN

Microsoft Excel has special functions to find a minimum, maximum and average value in a range. But what if you need to get a value from another cell that is associated with those values? In this case, use the MAX, MIN or AVERAGE function together with INDEX MATCH.

#### INDEX MATCH with MAX

To find the largest value in column D and return a value from column C in the same row, use this formula:

`=INDEX(C2:C10, MATCH(MAX(D2:D10), D2:D10, 0))`

#### INDEX MATCH with MIN

To locate the smallest value in column D and pull an associated value from column C, use this one:

`=INDEX(C2:C10, MATCH(MIN(D2:D10), D2:D10, 0))`

#### INDEX MATCH with AVERAGE

To work out the value closest to the average in D2:D10 and get a corresponding value from column C, this is the formula to use:

`=INDEX(C2:C10, MATCH(AVERAGE(D2:D10), D2:D10, -1 ))`

Depending on how your data is organized, supply either 1 or -1 to the third argument (match_type) of the MATCH function:

- If your lookup column (column D in our case) is sorted
**ascending**, put 1. The formula will calculate the largest value that is**less than**or equal to the average value. - If your lookup column is sorted
**descending**, enter -1. The formula will compute the smallest value that is**greater than**or equal to the average value. - If your lookup array contains a value
**exactly equal**to the average, you can enter 0 for exact match. No sorting is required.

In our example, the populations in column D are sorted in descending order, so we use -1 for match type. As the result, we get "Tokyo" since its population (13,189,000) is the closest match that is greater than average (12,269,006).

You may be curious to know that VLOOKUP can perform such calculations too, but as an array formula: VLOOKUP with AVERAGE, MAX, MIN.

## Using INDEX MATCH with IFNA / IFERROR

As you have probably noticed, if an INDEX MATCH formula in Excel cannot find a lookup value, it produces an #N/A error. If you wish to replace the standard error notation with something more meaningful, wrap your INDEX MATCH formula in the IFNA function. For example:

`=IFNA(INDEX(C2:C10, MATCH(F1,A2:A10,0)), "No match is found")`

And now, if someone inputs a lookup table that does not exist in the lookup range, the formula will explicitly inform the user that no match is found:

If you'd like to catch all errors, not only #N/A, use the IFERROR function instead of IFNA:

`=IFERROR(INDEX(C2:C10, MATCH(F1,A2:A10,0)), "Oops, something went wrong!")`

Please keep in mind that in many situations it might be unwise to disguise all errors because they alert you about possible faults in your formula.

That's how to use INDEX and MATCH in Excel. I hope our formula examples will prove helpful for you and look forward to seeing you on our blog next week!

## Practice workbook for download

Excel INDEX MATCH examples (.xlsx file)

## 610 comments

My data looks something like this, and i'm trying to carry over column 2 from tab 1, to tab 2 and match it to its corresponding value from tab 1. I also want to add and delete rows on tab 2, but when i do it offsets my results in tab 2 so A might correspond to 3 instead of 1.

Any help is appreciated!

TAB 1 TAB 2

A - 1 A -

B - 2 B -

C - 3 C -

D - 4 D -

Hello Noah!

To find a value on sheet2 that matches the data of sheet1, you can use VLOOKUP function. Look for the example formulas here: Vlookup from another sheet.

You can also find useful information in this article: How to compare two columns in Excel for matches and differences.

Hi,

ok... I have a sheet with a list of unique customers. From that, i have got a column with the amount of orders they have placed with me.

On a title sheet, I have my top 10 customers.

I have used the large function to pull the top 10 amounts of orders.

The next column i have the index function to match the name to the total orders number.

The problem I am having is, when 2 people have the same amount of orders..eg 15, it pulls the first name twice. So, number 7 and 8 on my list are both 15 orders, but both show the same name. How do i get it, so it doesn't show the same name twice?

Thanks in advance,

Mark

Hello Mark!

If I understand your task correctly, if your dataset contains duplicate numbers, to get the correct results, try using these guidelines: How to find top values with duplicates.

OMG! THANK YOU!!!!!!!! Hours wasted trying to figure this out... should've come and asked here a long time ago.

Top Notch! Thanks again!

Hi, I have an Excel Spreadsheet of Baseball Players and their stats and sorted by their last name. Each team has 2 players for each position, First base, Second Base, and so on. I want to extract each player for their position and each team's data into a spreadsheet. Sort of a breakdown for each team. I was thinking Index / Match would be the best way to do this, but the formula does not recognize the team’s name and gives me the first First Basemen it comes across, not the one that is assigned to Team 1(T1). Is index / Match the best way to do this or is there another way. Your help is appreciated. Thank you.

Hello David!

If you want to extract only one record that matches your two conditions, use these instructions: Excel INDEX MATCH with multiple criteria - formula examples.

If you need to extract multiple values for multiple conditions, check out this guide: How to Vlookup multiple values in Excel with criteria.

You can also filter the desired values in the table using FILTER formula. Look for the example formulas here: Excel FILTER function - dynamic filtering with formulas.

I hope it’ll be helpful.

Hi,

I'm trying to construct a formula to return the row # where the sum of the column values, eg A1:A5, exceeds a value in another cell, eg B1. Using SUM(A1:A5) won't work because it returns the sum of the whole column (obviously ;) & therefore will always be row 1, not the row where A1:A5 >= B1. For example, the formula result for the following sheet should return 3:

A B

1 5 19

2 10

3 15

4 20

5 25

=MATCH(1,INDEX(A1:A5>=B1,0),0)) will return 4 because 20>= 19, but that's not what I'm trying to compute.

Any suggestions?

Hi! Create an additional column (for example, column C) in which calculate the cumulative sum as described in this guide: Excel Cumulative Sum - easy way to calculate running total. To find the row number where the cumulative total is greater than a value you define, use MATCH formula:

=MATCH(TRUE,C1:C10>B1,0)

I hope it’ll be helpful.

Hi Alex & thank you for replying :)

In my scenario a helper column would have to be in a separate, possibly hidden, sheet of it's own. Possible, but I was rather hoping to solve this using a virtualised helper column constructed in the formula. Many hours of applying a sophisticated, iterative process of bashing my face against the keyboard have produced the following eureka:

MATCH(B1,MMULT(--(TRANSPOSE(ROW(A1:A5))<=ROW(A1:A5)), A1:A5 ))+1

Yes, there is a cosmological constant applied at the end. The MMULT logic always finds the row /prior/ to the cumulative total crossing the threshold. And yes, it will error if the range being queried has empty rows, so wrap in IFERROR(madness,"") to trap for that. What can I say, I'm just a monkey in pants.

Feel free to improve, criticise, laugh hysterically, drink a beer.

Later o/

hi anyone knw the message prompt in excel when i want to insert the row ? the message as below:-

"THE OPERATION YOUR ARE ABOUT TO PERFORM AFFECTS A LARGE NUMBER OF CELLS AND MAY TAKE A SIGNIFICANT AMOUNT OF TIME TO COMPLETE. ARE YOU SURE YOU WANT TO CONTINUE?""

how to solve it, pls, thank in advance !

Hello. I am trying to create a cell that searches a list of numbers and displays the largest one. However, I am do not know how to make the cell say the name of the row instead of just printing the number.

For example,

Red 60%

Orange 32%

Violet 12%

What is the exact code that I would use to make the cell print the word "Red" instead of just 60%

Thank you very much I am new to excel and am very bad at technology. When I read the guides on the INDEX MATCH formula it is very difficult to understand.

Have a good day!

Hi! Use the MAX function to find the maximum value in column B and then find its position using MATCH. Then use the instructions from the article above. For example:

=INDEX(A1:A10,MATCH(TRUE,B1:B10=MAX(B1:B10),0))

Hi,

I have a table in cells AI8:AV12, that contains 3 different categories.

All items in category 1 are vertical, and in merged cells: the 1st is in $AI$10 - $AJ$10, 2nd is in $AI$11 - $AJ$11 and the 3rd is in $AI$12 - $AJ$12.

Category 2 contains 4 different items which are horizontal and in merged cells: the 1st is in $AK$8-$AM$8, 2nd is in $AN$8-$AP$8, 3rd is in $AQ$8-$AR$8 and the 4th is in $AT$8-$AV$8.

Category 3 contains 3 different items, which are subcategories of category 2. These are horizontal, cells $AK$9, $AN$9, $AQ$9 and $AT$9 contain the text “Sol”, $AL$9, $AO$9, $AR$9, $AU$9 contain the text “Win”, and $AM$9, $AP$9, $AS$9 and $AV$9 contain the text “Bes”.

Cells AK10:AV12 have numerical values depending on categories 1, 2 and 3.

I need to find numerical values by looking up items in all 3 categories and I am assuming that a formula using INDEX and MATCH is required, but I can't get this to work without errors.

Could you kindly suggest a formula that cross checks and looks up the value in $AJ18 against the items in category 1, looks up the value in $B18 against the items in category 2, and looks up the value in $Q18 against the items in category 3 to retrieve the relevant numerical value?

Hi! To determine that the desired value is in a range of cells, you can use this statement:

=SUM(--(B18=AK8:AV8))>0

=SUM(--(AJ18=AI10:AJ13))>0

It will return TRUE if the value is found.

But your further description to retrieve the relevant numerical value is unclear.

Hi Alex,

I will try to clarify.

I have values in columns B, Q and AJ, which could match any values in the corresponding categories 1, 2 & 3 (the table and cell references containing these are explained in my first post). I want to retrieve the numerical value from the table according to the values in B, Q and AJ.

e.g., for the country name in column B I need to check which country name it matches in the table:

the 1st is in $AK$8-$AM$8, 2nd is in $AN$8-$AP$8, 3rd is in $AQ$8-$AR$8 and the 4th is in $AT$8-$AV$8

The cells are merged hence why I've given cell ranges despite there being only one country name per range, but I'm guessing its the leftmost cell that's important here

Then for the value in column Q, I need to check the subcategories:

Cells $AK$9, $AN$9, $AQ$9 and $AT$9 contain the text “Sol”, $AL$9, $AO$9, $AR$9, $AU$9 contain the text “Win”, and $AM$9, $AP$9, $AS$9 and $AV$9 contain the text “Bes”

In other words, each country in the table has "Sol", "Win" and "Bes" in the row below as their subcategories, hence why the country name are headers and are 3 merged cells above the 3 subcategories.

Lastly, the value in column AJ needs to be checked for a match with values in another category that are in the left column of the table:

the 1st is in $AI$10 - $AJ$10, 2nd is in $AI$11 - $AJ$11 and the 3rd is in $AI$12 - $AJ$12 (again the cells are merged, but there is only one value per range)

Therefore, the value in column B is checked across the table for a match with a country, then the value in column Q is checked for a match with the subcategory. This provides the correct column within the table to search in. Then the value in column AJ is checked against the rows, so you then have both the correct column and row from where to retrieve the value from.

Please let me know if this is clear enough for you to suggest a solution, as I have spent hours trying to get this to work but it is a little too complex for me.

Thank you!

If I understand your task correctly, the following tutorial should help: Excel INDEX MATCH MATCH and other formulas for two-way lookup.

Try this formula:

=VLOOKUP(Q18, AI10:AV13, MATCH(B18, AK9:AM9, 0) + MATCH(AJ18,AJ8:AV8,0), FALSE)

i have to workbook sheets , i have tried the index match but when you select dropdown to all of the some lines shows N/A then i put infront of the numbers the dollar signs but still its not working

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

Hi there,

I am trying to assist our Scheduling Person by creating a log for her to record the hours that staff work on projects.

My one page has the name of the person, project number, and time of shift worked and the hours are auto calculated.

I have the hours auto calculated once entered. We have approximately 10 blocks of this on one spreadsheet representing a pay period. (Employee name auto replicates in case the scheduler want to use the filter.

I want to create a separate spreadsheet (within the workbook) - a Summary page that will use the typed name on the summary page as the serch terms and then find the same employee name and copy the totaled days worked and hours worked totals to the summary page. I have tried various combinations and I am struggling. If you can assist I would appreciate it very much

Hello!

You can use a pivot table to get information on any employee. Use these instructions: How to make and use Pivot Table in Excel.

You can also create a filter for any employee using the FILTER function. Read more here: Excel FILTER function - dynamic filtering with formulas.

I hope it’ll be helpful.

Looking for some help please. I have two different worksheets. They both contain an employee code in Column A. However not all of the employee codes in Column A exist on both worksheets. Column B is empty on one worksheet and I want to populate the blank column with data from column B on another worksheet, but only where both Column A's match. I know I need to use some sort of a lookup formula but my brain hurts and I can't figure it out!

Hi! You can use the first example from the article above, or the VLOOKUP function as described in this manual: VLOOKUP between two worksheets.

=VLOOKUP(A2, Sheet1!$A$2:$B$100, 2, FALSE)

i,am using index and match,match but something wrong.

here what i have

sheet1

column c products

column B to ACJ cost price

row 3 exchange rate

row 4 date

=INDEX('cost price'!$C$7:$ACJ$99,MATCH($C16,'cost price'!$C$7:$C$999,0),MATCH($O$4,'cost price'!$C$4:$ACJ$4,1)*MATCH(W4,'cost price'!$C$3:$ACJ$3,1))

where is my error

regards

Hi.

It is very difficult to understand a formula that contains unique references to your worksheets in the workbook. You didn't explain what you want to do. I don't understand why you multiply MATCH * MATCH

From what I can tell, the index can't be a true arracy, it has to be one column. If I try to add any more than one column in the array for any purpose then it is very unhappy with it.

Perhaps there's a syntax issue I'm having, but looking at your formula, the index array is multi-column which gave me issues whenever I tried to do it.

Hi! I recommend you to read the article about the INDEX function carefully. An array of values can have many rows and columns, but you select the row and column you need from it.

Good day,

Please assist me to solve the following problem: I use the following Index_Match formular to look for all the 1st numbers that are above any zero in the data below. Meaning (the sum of 15+3=17). The formula I use is =SUMIF(INDEX(BN16:BN24,MATCH($BN$10,BN16:BN24,0)-1,0)) but it returns error.

Thank you.

2

15

0

1

3

0

9

9

I'm creating an employee review form. They are rated

1 Falls below standards

2 Below expectations

3 Meets expectations

4 Exceeds Expectations

5 Role Model.

Ratings are given a point value:

1 = 0 points

2 = .5 points

3 = 1.5 points

4 = 2 points

5 = 2.5 points

I want to return combined point value from 4 - 5 job skills.

Hi!

I don't quite understand what result you want to get. Maybe this guide will be helpful: Nested IF in Excel – formula with multiple conditions. You can also find points corresponding to the rating using the recommendations from the article above. If this is not what you need, please explain exactly what result you want.

hello

is it possible to apply multiple match criteria to get a single value

for example

name age salary Employee ID

a 10 100 ABCD

b 20 200 EFGH

d 30 300 IJKL

c 40 400 MNOP

i want to get employee ID based on NAME,AGE,SALARY

is it possible to apply 3 different conditions to get output in index-match

Hi!

Pay attention to the following paragraph of the article above - Excel INDEX MATCH to look up multiple criteria.

It covers your case completely.

got it sir

and thanks for reply

Yes, INDEX and MATCH is superior to VLOOKUP in many ways. It allows you to work how you want.

VLOOKUP is dangerous as if you don't know what you are doing you can get incorrect values back and not even realise.

But the new XLOOKUP is even better.

XLOOKUP combines the best features of INDEX and MATCH and also IFERROR all into one function.

What is the Index match across a single row to get the corresponding cell val in proper sequence eg i want Match 'Tom' with name values in E,F,G,H and get the corresponding column value from A,B,C,D

A B C D E F G H Match Output

1 2 3 4 Mary James Tom John Tom 3

Apologies if this is too basic

Hi!

Have you tried the ways described in this blog post? Use the [column_num] parameter in the INDEX function.

=INDEX(A1:D1,,MATCH("Tom",E2:H2,0))

how to only unique values from a table

for exmple

city-1 city-2 city-3 city-4

jaipur kolkata pune kota

delhi mumbai delhi jaipur

pune kota kolkata jaipur

kolkata delhi jaipur mumbai

delhi kolkata pune delhi

jaipur kota mumbai jaipur

delhi jaipur kolkata mumbai

output--

unique cities

jaipur

delhi

pune

kolkata

kota

mumbai

Hello!

You can read this comment on how to get unique from multiple Excel columns.

thanks for your quick reply

your formula is working well.

please take a look on this problem

Person city-1 city-2 city-3 city-4

A jaipur kolkata pune kota

B delhi mumbai delhi jaipur

C pune kota kolkata jaipur

D kolkata delhi jaipur mumbai

E delhi kolkata pune delhi

F jaipur kota mumbai jaipur

G delhi jaipur kolkata mumbai

output

Unique Cities Persons Visited

jaipur A,B,C,D,F,G

kolkata A,C,D,E,G

pune A,C,E

kota A,C,F

delhi B,D,E,G

mumbai B,E,F,G

i want to know the list of persons who goes to this particular city.

also it possible through no array formula, bcz array formula slow down the sheet when they are in large numbers

Hello!

You can get a list of rows with the desired city (cell G1) using the FILTER function. Extract the first column from this list using the INDEX function. Combine these values into a text string with the TEXTJOIN function.

=TEXTJOIN(", ",TRUE, INDEX(FILTER(A1:E6,(B1:B6=G1)+(C1:C6=G1)+(D1:D6=G1)),,1))

sir filter function is only available in Excel 365

can you suggest any other formula which works in lower versions also

thanks

Hi!

In your Excel, this problem cannot be solved with a formula. I recommend trying the Find Duplicate Cells tool.

It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

i have a problem problem is given below please solve it

296 RGS/296-22-23 06/02/2022 9748854 17-04-22 651597.00

297 RGS/297/22-23 06/02/2022 9748854 17-04-22 20516.00

298

323

324

vlookup show in up column but did not show 298 and 323 another 324 here is the formulla please solve it

=iferror(vlookup(A49,IMPORTRANGE("1SJAXYIj-mmgM0xpPHUU7NwURZcHRrT_onL60Uqigsrw","SALEREGISTER!b4:m300"),4,0),"")

Hi!

Your question is not clear. If you are using the VLOOKUP function in Google Sheets, please post your question in the appropriate blog section.

Dear Alexander,

1. I have two columns in Sheet1 having data wherever there is data in Column A there is no data in Column B and vicversa.

I want to lookup both these value (both the columns) and get the result in one column i tried by following vlookup but not getting the result =vlookup(a2&22,'sheet2'!C$2$:D$56$,2,0)

Kindly try and Help.

2. Since i was not geeting the result with above i used vlookup in two different columns seperately for Column A and Column B as below

=IFERROR(VLOOKUP(A2,'Sheet2'!$c$2:$D$100,2,0),"")

=IFERROR(VLOOKUP(B2,'Sheet2'!$c$2:$D$100,2,0),"")

Than concatenated both the columns =CONCATENATE(a2,b2) and got the result

but my issue is wherever there is blank cell i need to input the text as OTHS so how do i achieve that.

Need your help and support.

Hello!

If I understand correctly, you can use a condition in an IF function.

Please use the formula below:

=IF(CONCATENATE(A2,B2)="","OTHIS",CONCATENATE(A2,B2))

Trying index/match or vlookup and not working. Value trying to match is A1= James Logan Howlett. Match range has A25 = Logan Howlett, James.

=INDEX(B25:B29,MATCH(A1,A25:A29,0)

i am having trouble figuring out how to "match" the two names. Data list is relatively short so vlookup, index/match or something else I am not familiar with? In the output I am getting in some cells data that does not match up with the match value or it returns #N/A.

Thank you in advance.

Hi!

Cells A1 and A25 have different values. Therefore, there is no match here.

Thank you for the reply. Yes, this is the problem. Is there a solution? I have looked at wildcards and have not figured that out. Is there a formula that would allow the last names to be matched to one another? Is there a formula that would look at only "Logan Howlett" in one cell and match or vlookup it to the range containing "Logan Howlett"

A formula that looks at "Parker" in Peter Parker and matches it, or vlookup to "Parker" in Parker, Peter? I have figured out how to match Peter Parker to P. Parker but the above scenario still has me stumped.

Peter Parker > Parker, Peter

James Logan Howlett > Logan Howlett, James

I need both scenarios to work as some on the list have a second last name.

Hello!

Read the instructions on how to split full name to first, last, and middle name from string.

This formula matches the name from column A to column B and returns the matching value from column C

=INDEX(C2:C8,MATCH(1,ISNUMBER(SEARCH(LEFT(A2,SEARCH(" ",A2)-1),B2:B8))* ISNUMBER(SEARCH(MID(A2,SEARCH(" ",A2)+1,SEARCH(" ",A2,SEARCH(" ",A2)+1)-SEARCH(" ",A2)-1),B2:B8))* ISNUMBER(SEARCH(RIGHT(A2,LEN(A2)-SEARCH(" ",A2,SEARCH(" ",A2,1)+1)),B2:B8)),0))

I hope it’ll be helpful.

Hello!

For index-match combination, is this possible to set the "lookup_value" inside match function to "a spill range"? My index-match formula works without any problem when lookup_value is a single value, however when I change that value to a spill range, result become #N/A. My aim is to expand the formula for each row on a table dynamically, within one single formulated cell.

Hello!

The MATCH function cannot use a range as a lookup_value. You didn't write what you want to do and what formula you use. But maybe you will find this article useful: Excel INDEX MATCH with multiple criteria - formula examples.

Hello! I need to output multiple values with the same criteria, but it only outputs the first closest value. how can i complete the formula?

Hello!

You can find the examples and detailed instructions here: How to VLOOKUP multiple values in Excel with criteria.

I am trying to set up a golf spreadsheet. So I would have a column with all the player's names

Then a Column with the scores. I then want excel to automatically select the first and second-highest scores.

I did this with LARGE but if there is more than one score the same I need it to show all those players.

65 Tom, 1st

66 Jack John George, Second

So excel pulls the score and player's names, including multiple players with the same score?

Hello!

You can get a sorted list of values using the UNIQUE function and SORT function.

=SORT(UNIQUE(A2:A15),,-1)

Write this formula in cell C2.

Use the FILTER function to get a multiple values by condition.

=TEXTJOIN(", ",TRUE,FILTER($B$2:$B$15,$A$2:$A$15=$C$2))

=TEXTJOIN(", ",TRUE,FILTER($B$2:$B$15,RANK($A$2:$A$15,$A$2:$A$15,0)=ROW()-1))

Write this formula in cell D2. After that you can copy this formula down along the column.

I hope I answered your question. If something is still unclear, please feel free to ask.

A B C D E

At Admision Code - At admission Score - At discharge score - At discharge Score - At discharge Code

IMBD0349 . 6 . ? . 2 . FSKA0306

IMBD0350 . 8 . ? . 3 . SDBD0333

IMBD0351 . 7 . ? . 5 . FSKA0308

IMBD0352 . 9 . ? . 4 . IMBD0350

FSKA0305 . 6 . ? . 8 . FSKA0305

FSKA0306 . 8 . ? . 7 . JEID0044

FSKA0307 . 7 . ? . 5 . IMBD0351

FSKA0308 . 9 . ? . 3 . IMBD0349

I want to match the column A code to column E Code after matching correct number should be automatically come to column C

At Admision Code Gender At admission Score At discharge score At discharge Score At Discharge Code

IMBD0349 Male 6 2 SDBD0332

IMBD0350 Female 6 4 SDBD0333

IMBD0351 Male 6 2 DJBD0012

IMBD0352 Female 5 6 IMBD0350

FSKA0305 Male 6 7 IMBD0351

FSKA0306 Female 7 4 JEID0044

FSKA0307 Male 5 3 HNRT0364

FSKA0308 Female 6 6 HNRT0365

FSKA0309 Male 6 5 FKRK0033

HNRT0364 Female 5 2 URJE0044

HNRT0365 Male 7 3 JFDK1123

HNRT0366 Female 6 1 HNRT0367

HNRT0367 Male 6 4 HNRT0368

HNRT0368 Female 5 5 DFDD2322

SDBD0332 Male 5 8 KIDK9922

SDBD0333 Female 6 7 SDBD0335

SDBD0334 Male 8 9 DLWW0098

SDBD0335 Female 6 4 KDEK0088

Match column A & F

At discharge score column E

match score should automatically come D column

Hi!

I can't guess what is written in column F and what values you want to match. Give an example of the expected result.

Hi,

What is wrong with this formula. Getting error #N/A.

{=INDEX($AX$2:$BI$288,MATCH(1,(AB2=$AW$2:$AW$288)*(AS2=$AX$1:$BI$1),0))}

Hi!

The #N/A error means that the lookup value could not be found. But I can't see your data, so I can't tell you why.

Hello Alex,

Yes, I understand. but Data is there in my index range. when I debug formula $AW$2:$AW$288 return false value even though AB2 data is there.

How can I copy data or snip data here.

Please

Thanks for your time and quick reply.

ABC

Hello!

Perhaps the problem is that with the INDEX function you want to get a value from a 2D array, but you specify only the row number. You can find the examples and detailed instructions here: Excel INDEX MATCH MATCH and other formulas for two-way lookup.

I hope it’ll be helpful.

Hello Alex.

yes, you are correct. updated and its works

=INDEX($AX$2:$BI$288,MATCH(AB2,$AW$2:$AW$288,0),MATCH(AS2,$AX$1:$BI$1,0))

Thanks,

Thank you for all your help. Your service was excellent and very FAST. Many thanks for you kind and efficient service. I have already and will definitely continue to recommend your services to others in the future.

1 it is

1.1 it is not

1.1.2 it is not good

plz search item 1.1.2 and combine in excel

Sorry, it's not quite clear what you are trying to achieve.

I have used this Index Match function quite a few times; however, I am seeing something today that I can't figure out. Here is the formula I am using: =INDEX(Table3[#All],MATCH(1,($B4=Table3[Part No])*($A4=Table3[Site]),0),MATCH("Std Costs",Table3[#Headers],0))

The result is finding data on the table, but it is returning the value 1 cell above the value that is being searched for. I don't know what is happening.

Thanks,

Duayne

Hello!

Table3[#All] reference includes the entire table along with the header row. Here the first row is the headers, not the data. The rest of the links include only data without headers.

I hope I answered your question. If something is still unclear, please feel free to ask.

Thanks for your help and effort and providing same fiel with formulas. This is awsome.

Keep the good work going on.

Hi, your formula works fantastic for me! But get a zero in cells that has no data. How can I resolve this issue?

This is the formula I am using

=INDEX('B1'!$H$2:$H$3099,MATCH($C$18:$C$3115,'B1'!$B$2:$B$3099,0))

Btw, I am a noob in this. Below was the original formula

=INDEX('B1'!$H$2:$H$3099,MATCH(C18,'B1'!$B$2:$B$3099,0))

It work fine, but when i copy to the rest of the same column below, no doubt the C18 will change accordingly but it shows the exact same info in the cell. However, when select the cell and click on the formula bar once and press enter, the info will change and it's accurate. Also, I don't know why when i move my cursor to the bottom right corner and when the + sign show up, I double click and nothing happen. It should duplicate the formula for the entire column right?

Your kind advice will be very much appreciated!

Hello!

I recommend reading this guide: How to use AutoFill in Excel - all fill handle options.

Hi Texx,

I cannot imagine how it can be that the formula returns zeros in cells that have no data; for me it returns the #N/A error in this case. Anyway, this can be easily fixed by wrapping your formula in the IFERROR function, so that it returns an empty string (blank cell) when no match is found:

=IFERROR(INDEX('B1'!$H$2:$H$3099,MATCH(C18,'B1'!$B$2:$B$3099,0)), "")

Also, I'd suggest that you stick with the original formula that uses a single cell for the lookup value (C18). Using a range may cause very frustrating issues (#SPILL error) when migrating to Excel 365 or Excel 2021.

Double-clicking the plus sign works as long as there is some data in the adjacent column(s). As soon as an empty row occurs, the auto fill stops. In this case, you can copy the formula down by dragging the fill handle (a small square at the lower right-hand corner of the cell). For more information, please see How to copy formula in Excel.