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. Continue reading
by Svetlana Cheusheva, updated on
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. Continue reading
Comments page 3. Total comments: 614
Can I use and function inside of Vlookup.
Hi!
Please have a look at this article: Vlookup multiple matches in Excel with one or more criteria.
Thank you very much for your valuable suggestions. Much appreciated. .. :)
ColA ColB
Fruits Count
Apple 10
Orange 20
Mango 30
Apple 20
Banana 10
Orange 30
Apple -30
Orange -20
Condition is:
I need a unique array list of fruits in ColC and do not need the fruits on list whose count is 0. Here, Apple has count 0 as (10+20-30).
Result may be:
ColC
Orange
Mango
Banana
Could you please clarify me below condition. Can we use SUMIF function in Index+Match+Match. I had tried one formula to make output as ColC but did not work. Or, if you can suggest one will be much appreciable.
{=IFERROR(INDEX(A2:A9,MATCH(0,COUNTIF($C$1:C1,A2:A9)+(SUMIFS(B2:$B$9,A2:$A$9,D2)0),0)),"")}
Thank you very much in advance.
Hi,
Your problem with one formula can only be solved in OFFICE365 using the UNIQUE function.
I have already written a solution for you using an additional column.
Thank you very much for your kind and quick response. Much appreciated.
But, could you please clarify me one condition. Can we use SUMIF function in Index+Match+Match. I had tried one formula but did not work.
{=IFERROR(INDEX(A2:A9,MATCH(0,COUNTIF($C$1:C1,A2:A9)+(SUMIFS(B2:$B$9,A2:$A$9,D2)0),0)),"")}
Please clarify on this.
hi,
I'm sure this is a very simple but I'm struggling in one situation. Need your kind assistance.
ColA ColB
Apple 10
Orange 20
Mango 30
Apple 20
Banana 10
Orange 30
Apple -30
Orange -20
Condition is:
I need a unique array list of fruits in ColC and do not need the fruits whose count is 0. Here, Apple has count 0 as (10+20-30).
Result may be:
ColC (Sorted) ColC
Orange Banana
Mango Mango
Banana Orange
In addition, if this list can be sorted in alphabetical order by formula will be great. I'm using Excel 2016.
Looking forward to your kind reply.
Thank you very much in advance.
Hello!
Your version of Excel has very limited options for solving your problem.
You can use these instructions to get a list of unique values from column A.
Then, in column D, you can calculate the amount from column B for each unique item. To do this, use the SUMIF function.
I hope my advice will help you solve your task.
i need an excel formula that will refer back to a chart to look up data and return the correct data. In my spreadsheet, I enter a width in A1, a Depth in B1, a Thickness (from a drop down list) in C1 and then I want the correct cost to populate in D1 based on a table on another worksheet. Can that be done? The table consist of all of the possible dimensions and their costs.
Please HELP... anyone!
Thank you sooooo much!
Hello!
Please have a look at this article - How to Vlookup multiple criteria.
Hope you’ll find this information helpful.
I have a formula with INDEX and MATCH. I use this to get dates from one sheet to another (to keep it brief). In the column in sheet B are several empty cells. These empty cells in sheet B cause the cells in sheet A to be filled with '00-01-1900'. This makes sense, but I would like to fill these with a small text message: "No date". Instead of printing 'no date' it prints '00-01-1900'. How do I solve this?
My current formula looks like this:
=IF(sheet B!G2=" ", "No date", INDEX(sheet B!$G$2:$G$4408, MATCH(sheet A!H2,sheet B!$F$2:$F$4408,0)))
Hello!
I believe the following formula will help you solve your task:
=IF(B!G2="", "No date", INDEX(B!$G$2:$G$4408, MATCH(A!H2,B!$F$2:$F$4408,0)))
I hope it’ll be helpful.
Hey,
Thank you for your quick reply. It doesn't change anything. But I am using a Dutch version of Excel: therefore I translated my formula to English. The formula I have before me is this: =ALS(Inspecties!G2=" "; "Geen inspectiedatum"; INDEX(Inspecties!$G$2:$G4408; VERGELIJKEN(Hoofdbestand!H2;Inspecties!$F$2:$F$4408;0)))
I tried to replicate your adjusted formula, but I get the same result. Can you look at my formula again? If you need more information, just say the word.
Thanks,
Patrick
Hi,
Inspecties!G2=" " write without space: Inspecties!G2=""
I think the reason is this.
Hey,
Sadly, I get the same outcome :(.
Can you think of anything else?
Thanks,
Patrick
Hello!
Unfortunately, without seeing your data it is impossible to give you advice.
Could you please describe your task in more detail and send us a small sample workbook with the source data and expected result to support@ablebits.com? Please shorten your tables to 10-20 rows/columns and include the link to your blog comment.
Milestones in Column E of input-contract sheet as, "Effective date", "Payment 1", "Export License", "Kick-off meeting", etc.
Trigger event in Column C of input-contract sheet as, "Contract Registration", "Effective date", "payment 1", "export License", etc.
Milestone date in column E of input-contract sheet (which is calculated based on conditions) as, "1-Jan-21", "1-Jan-21", "22-Jan-21", "5-Feb-21", etc.
I want to build a financial model in another sheet (model sheet), for that I used the transpose function entered as an array formula to transpose the values of column E in a row into the model sheet. it worked well.
now, I wanted to bring in the milestone dates associated with those milestones and wanted to use the INDEX MATCH function. This is what I typed in the model sheet =INDEX('Input-contract'!E22:E52,MATCH(Model!B20,'Input-contract'!A22:A52),0). where Model!B20 is "Effective date"
I wanted the formula to look for the date when the "effective date" took place which should have been 1-Jan-21. However, the formula returns me the value of 19-Nov-23.
all cells are formated appropriately, not sure why this happening. can you help?
Thanks,
Luis
Hello!
Unfortunately, without seeing your data it is impossible to give you advice.
I'm sorry, it is not very clear what result you want to get. Could you please describe your task in more detail and send us a small sample workbook with the source data and expected result to support@ablebits.com? Please shorten your tables to 10-20 rows/columns and include the link to your blog comment.
We'll look into your task and try to help.
=INDEX(Column_1,MATCH(1,MMULT(--(Draw_Data=Your_Selection),0)))
Draw_Data => rows of 7 unique numbers
Your_Selection => 7 unique numbers chosen
In the calculation steps produces a series of 7 "TRUE"s ... in it's output (and many "FALSE" also). How could I obtain a result of "Yes" to the function based on the 7 "TRUE"s or "NO" if there are not 7 "TRUE"s in a row?
Thank you for your time and efforts,
Myron
Hello!
Your task is not completely clear to me. Unfortunately, without seeing your data it is difficult to give you any advice. Please provide me with an example of the source data and the expected result.
Could you please describe your task in more detail and send us a small sample workbook with the source data and expected result to support@ablebits.com? Please shorten your tables to 10-20 rows/columns and include the link to your blog comment.
We'll look into your task and try to help.
This is a question in a similar vein. A spreadsheet containing a column of random text, and each line of this text contains a "Unit Number" somewhere in the text. I tried to write LEFT, MID, RIGHT rules to extract these "unit numbers" onto a seperate column, but the positions in the text are even too random for that.
So I would like to take a different approach. (1) Have a complete list of the "Unit Numbers" on a seperate sheet. (the complete fleet) and (2) then reference this list against the random text. If it finds a match to the UN list anywhere in the random text, it deposits that Unit Number that it found on the UN list onto the find formula column.
Any suggestions for a MATCH or VLOOKUP or some other formula that would do that?
Hello!
Unfortunately, without seeing your data it is difficult to give you any advice. Please provide me with an example of the source data and the expected result.
I HAVE THE MANY AMOUNTS IN ONE ROW FROM 100 TO 1500 AND I WANT TO MAKE THE MATCH/GROUP/BATCH OF 2500 HOW CAN I DO IT IN EXCEL PLS REPLY
Hi,
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you.
Hi, I am trying to fetch a value using formula but unable to do so as it is returning me #REF
Formula i used is as below.
=INDEX(Priority!A5:G16,MATCH(A16,Priority!A:A,0),MATCH(B15,Priority!B4:G4,0))
Could you please help !!
Hello!
The #REF error means that your INDEX function wants to show a value that isn't there. For example, in the range A5:G16 there are 12 lines. You want to show the value from the 14th line.
I hope my advice will help you solve your task.
This is what my sheet is
P1 P2 P3 P4
March 4 2 7 9
December 5 1 8 6
Hello!
Sorry, it's not quite clear what you are trying to achieve. What cells are your data recorded in? A21:E23? No! Do you want to get several values with one formula? Describe the expected result more clearly. What is written in A17 and B16?
This is what my Sheet is
P1 P2 P3 P4
March 4 2 7 9
December 5 1 8 6
and this is what i am trying to find
P3
March 2
using formula "=INDEX(A21:E23,MATCH(A17,A21:A23,0),MATCH(B16,B21:E21,0))"
But it is returning me value of P2 instead of P3. Can you please help why it is returning value of a column before.
Hi,
Hi, I'm trying to create a formula that allows me to search a column for a product number which exactly matches the product number (in a column) in another workbook. The first workbook has a product cost associated with it, in a separate column. The second workbook has a price associated also (which is a price change in a separate column).
I would like to populate a new column in Workbook 1 with the new price. (price increase)
Workbook 1 has hundreds of items and cost prices.
Workbook 2 (only select items from original list in Workbook 1) Price Increases
The item numbers are not on the same line in the two workbooks.
I need to match the item numbers from the two workbooks and bring the price increase associated with the product item number (from Workbook 2) into the original workbook. (Workbook 1)
Hello!
Unfortunately, without seeing your data it is difficult to give you any advice. Please check out the following article on our blog, it’ll be sure to help you with your task: How to Vlookup from another sheet in Excel
Hope you’ll find this information helpful.
Hi - I tried to use INDEX and MATCH together and have been getting a #VALUE! error. I tried to break it down, and created a cell with just the MATCH part in it. But no luck.
So I put the cells with identical (perfectly identical) long strings of text in them. I know they are identical because I pasted from one cell to the other. Next to these cells I created a cell with a simple IF condition to return YES if the cells with the text are equal. Indeed, it returned "YES" So I then created a MATCH formua in the next cell which reads something like: =MATCH(K850,J800:J900,0). The identical cells are in J850 and K850 respectively. Yet - no luck at all.
The text btw is "Care Instructions: Lid Cork, Use only for its intended purposes. Immediately wash and dry well after use, and keep dry when not in use. Do not overheat in the microwave or heat without water. Wash with care. Don't use abrasive cleansers or steel wool. Don't place near fire. Sudden temperature changes may break or shatter the product. While the glass is hot, don't pour cold liquids into it and don't place it to on a wet cloth or in a wet sink. Be aware that the lid may become stained with the odor or color of some foodstuffs.". Nothing personal or confidential so I decided to paste it here.
What am I doing wrong?
Hello!
Unfortunately, without seeing your data it is difficult to give you any advice. Could you please describe your task in more detail and send us a small sample workbook with the source data and expected result to support@ablebits.com? Please shorten your tables to 10-20 rows/columns and include the link to your blog comment.
We'll look into your task and try to help.
When I put in this formula I get the N/A
result, =INDEX(MIN(IF(F2:F77>0,F2:F77)),MATCH(1,INDEX((L22=A2:A77)*(M22=B2:B77),0,1),0))
Column F is the result of another formula, What should I change to make this formula work.
Hello!
INDEX MATCH formula in Excel cannot find a lookup value. This N/A error is explained in this article above. Unfortunately, without seeing your data it is difficult to give you any advice.
Thank you for this, I have used it so often and it has saved me SO MUCH time. Just one thought, there has been a change in how Excel handles the function and you now need to add "@" before "lookup value" to prevent a SPILL error. Perhaps you can update the formula?
Hello excel Guru's, I am hoping someone may be able to asst me with creating a formular for the below? It's beyond my basic excel capabilities.
Column A contains task numbers (i.e SMT001) and column P contains a task duration in seconds(i.e 11040). I need a formula that can search column A for duplicate task numbers and add the corresponding task durations in column P to give me a total task duration. is this even possible in excel?
Any guidance would be appreciated.
Hi, i'm trying to create a formula that allows me to search a column for a reference number which exactly matches the reference number on another worksheet within the same workbook. I need it to return a Yes or No.
On worksheet 2 In cell H3, I would like it to return a Yes if the ref number in Cell E3 matches any of the ref numbers on Worksheet 1 Column E Range E2:E500.
Hello Lisa!
If I understand your task correctly, the following formula should work for you:
=IF(ISNUMBER(MATCH(E3,Sheet1!E2:E500,0)),"Yes","No")
I hope my advice will help you solve your task.
Thank you so much Alexander! I really appreciate your help.
When I tried your formula, the cell defaults to Y, even if B16:B46 are blank. But as soon as an N is put in any of the cells, the cell will turn to N. So anything but an N will keep the cell as Y. I was trying to have it such that even a blank cell in B16:B46 would result in the cell having an N. This will work for now, though. Thank you again! I very much appreciate it!
How do I write the following formula:
If B16:B46 are all Y, then this cell should be Y. If any of the cells between B16:B46 are N, then this cell should be N.
Also, how do I write this formula with two factors:
If B16:B46 AND C16:C46 are all Y, then this cell will be Y. If any of those cells have an N, then this cell should be N.
Hello Mohammed!
If I understand your task correctly, the following formula should work for you:
=IF(ISNUMBER(MATCH("N",B16:B46,0)),"N",IF(IFERROR(MATCH(1,IF(B16:B46="Y",0,1),0),"Y")="Y","Y",""))
I hope this will help
I have a result set as below:
COL A COL B
1111987 1224
1119361 1072
1119361 1223
1119361 1224
1123961 1223
1123961 1224
1124136 1072
1124136 1223
Since No# - 1124136, isn't having a combo of 1224, I wish to have that as a result.
Please assist.
Hello!
If I understand your task correctly, the following formula should work for you:
=INDEX(A1:A8,MATCH(0,COUNTIFS(A1:A8,"="&A1:A8,B1:B8,"=1224"),0))
I hope this will help
I have name of students in column B and grade scored in column BT in sheet 1. I want to pull the name of students who scored A to sheet 2, B to sheet 3, C to sheet 4 etc
Hello!
Read more about Vlookup multiple matches and return results in a column in this article.
You can use our ready-made solution.
I'd recommend you to have a look at our Ablebits Tools - Split Table.
This tool is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and use for 30 days for free: https://www.ablebits.com/files/get.php?addin=xl-suite&f=free-trial
I am looking to match based on two unique numbers that have the same result. The lookup tables or array results are in a different
Example.
Column A = US product ID #
Column B = CA product ID #
Column C = the product name of both Column A and Column B of that Same row, so can have either a corresponding US or CA Product ID
Example: US1234 or CA123 = pencils
For the entry, they will only enter in product ID number below, and I want to dynamically return the product name without knowing if it will be a US ID or a CA iD
Product ID Product Name
Thanks
Hello Joseph!
If I understand your task correctly, the following formula should work for you:
=IFERROR(INDEX(C1:C5,MAX(IFERROR(MATCH("*"&$E$1&"*",A1:A5,0),-1), IFERROR(MATCH("*"&$E$1&"*",B1:B5,0),-1))),"ERROR")
where E1 -- Product ID
I hope this will help, otherwise please do not hesitate to contact me anytime.
Hi all,Good day
I need some help.
I have a list of 5000 items.
For each item, many Purchase orders have been raised.
how to extract item wise Purchase order numbers. Tried VLOOKUP and pivot , not able to get.
Hello ANAND!
I’m sorry but your task is not entirely clear to me.
What is " item wise Purchase order numbers"? What exactly do you want to count? How many purchase orders were there? Amount?
For me to be able to help you better, please describe your task in more detail. It’ll help me understand it better and find a solution for you. Thank you.
I am using the formula to copy values from one sheet to other, from a table with 8 columns. The value has to come from the 8th column. The formula is working fine. Kindly inform if any variable can be put instead of writing 8.
Thanks.
Sheets("EXE_1").Select
Range("O4").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR((INDEX(MIN_WIP!R4C17:R20C25, MATCH(EXE_1!RC[-13],MIN_WIP!R4C17:R20C17,0),8)),""0"")"
Hello Manas!
It is possible to insert an expression, which will return a number, instead of "8" in your formula. However, to give you a full and accurate answer, additional information on the result you would like to get is required. Moreover, I would like to see your formula in standard view, not R1C1.
Hello,
I have a table of values where I want to pick a specific unit, look for the last (previous) "on" for that unit, and record/calculate the time in between when the unit was turned on and when it was turned off.
I.E. - Lights - Jerry turned the lights ON @ 11/1/2019 10:56AM and OFF @ 11:05AM so the DURATION = 00:09:00.
Person TIME ON/OFF UNIT DURATION
Dan 11/1/2019 10:00AM OFF Lamp
Jerry 11/1/2019 10:56AM ON Lights
Tom 11/1/2019 10:59AM ON Door
Dan 11/1/2019 11:02AM ON Car
Dan 11/1/2019 11:03AM OFF Car 00:01:00
Jerry 11/1/2019 11:05AM OFF Lights 00:09:00
How do I get the DURATION cell in the "Lights" "OFF" line to populate based off the TIME from the last "Lights" "ON" line?
Thank you!
Hi,
I try to lookup formula match with any of two different range. It means first look with A4 suppose if details not available means get the data with B4 cell.
It seems a Windows update has now broken this formula and it produces a #SPILL error message. Can you produce a workaround for this?
Hi Graham,
I've retested the formulas in our sample worksheet. All seem to be working normally. Can you please specify exactly which one returns an error?
NEW STOCK
TOTAL
32
OLD STOCK
TOTAL
45
OLD 0-100 DAYS
40
OLD 100+ DAYS
5
NEW 0-100 DAYS
RESULT REQUIRED
32
NEW 100+ DAYS
0
Hi, if there a “name “in a2,a6,a7,a16 etc how can I fetch data of b2,b6,b7 and so on? I tried using index but it ends up with showing result of b2 only
Hi Team,
I am trying to use index match in the following situation, could you please assist with this? :
tab1 : current month data - FTE details containing staff number, name, FTE,Position,auto pay-Y/N
Tab2 : previous month data - FTE details containing staff number, name, FTE,Position,auto pay-Y/N
I want to see all the leavers so I am using the following formula, please let me know how to correct this :
=if(index(current month staff id,match(1,(current month auto pay=Y)*(current month=Jul19)*(previous month staff id=current month),0))=previous month staff id," ","Leaver")
Hi! How can I add more criteria to the INDEX MATCH formula when looking up at let's say 5 parameters to get more than one return, i.e. looking up suppliers criteria to return supplier names? I've managed to utilize INDEX MATCH but if there is more than one supplier matching the criteria, the formula only returns the first supplier name.
THanks!
Pulling my hair out now.
Main Data table has skills in column A, Names across the top in row 5, and the data that links these are 1-5 (skills matrix basically).
I'm trying to now (on a separate tab) pull the info per individual, in that on a new sheet, I have a list of the names, but to the right of them (in multiple cells) have all the skills that they have a 5 against. (Basically, trying to get a list of all their top rated skills).
Rough look of data;
Jay | Chris
Redhat 5 5 | 4
Redhat 6 4 | 5
AIX 7 5 | 3
From here, I'd like the formula to look through Jay, and next to his name (in the new sheet) pull Redhat 5, then AIX 7. For Chris it would just be Redhat 6.
Hope someone can help!!
=INDEX([12.xlsx]Sheet1!$F$2:$F$141,MATCH([12.xlsx]Sheet1!$E$2:$E$141,P6:P18,1))
i am able to get the value but it is not matching
i am trying but it is not matching
Good afternoon, I am using the array formula to match a single value, I was wondering what can I change to get all the lower than $k$1.For example, if I type 300 in $K$1 I want the system to go and find all the values between -0 to 300 included.
=IFERROR(INDEX(Data!$A$9:$A$900,SMALL(IF(COUNTIF($K$1,Data!$H$9:$H$900), MATCH(ROW(Data!$H$9:$H$900), ROW(Data!$H$9:$H$900)), ""), ROWS($A$1:A1))),"")
It would be great if you can help me.
Hi! I just need the same formula that Lee-Anne requested above.
Thank you!
So can I use the index & Match with named Ranges?
I keep trying but it keeps coming back N/A, (A value is not available)
Thanks
Hi Madam,
Today I am trying two-dimensional VLOOKUP formula e.i(=INDEX($A$1:$E$11, 4, 5, 0)).
I need to try =INDEX($A$1:$E$11, 5, 4, 0)).....Is it possible??
pls help
Please help!!! I have a large workbook contains 100+ worksheets. on Each worksheet I have a product number in column B and the worksheet name in column c
In a summary sheet I have a list of product numbers in column D.
Is there a way to use Index and Match to search the entire workbook in Column B of each worksheet, for the product number located in my summary sheet in column D and return the worksheet name located in column C of each worksheet?
Thank you so much!
please help. i have 3 columns. how to find the value of Bus 3 & car 3 values using index and match functions
col 1 col 2 col 3
bus 1 2100
bus 2 200
bus 3 500
car 1 200
car 2 300
car 3 400
hello i am having some trouble with my index match function i am usung it to return one size below my input size for instance when i input a size D10.75 it returns D10.01 (the way our measurements work) but when i move to a size under 10 ( D9.4) it will return our largest size (30) just wondering if anyone has had similar issues i have not found any errors with sizes above 10
Hi Svetlana,
The fantastic thing about Index Match is it solves most of the troubleshooting issues that arise from the other lookup functions. You can find a related value in any table at all, searching on any value you have. The other file doesn't have to have the same set of values on the search variable, nor does it have to be sorted in any order. So Index Match is amazingly powerful, flexible and accurate. Of course it does takes some concentration to work with it.
I first figured out the Index Match combination back in the 90's when I was doing heavy analysis of data. I'm glad to see it's eventually getting to be better known. It would be a lot better known if Microsoft made it into a single function, which would be easier than combining two functions yourself.
Hi, Thank you for this useful information about index & match. It is very useful to us and it will save time to us for our work.
Hi, Svetlana. Thank you for a great tutorial. Unfortunately, I'm quite new at Excel, and have trouble applying INDEX/MATCH in my sheet. I hope you can help. Here goes: I have one summary tab (X) where each column's data would be ported over to different tabs (Y) in the sheet. Each column of X will be numbered at their corresponding topmost cell from 1 to 10, and each Y tab will be labelled from 1 to 10 in a specific cell. Would it be possible to match/lookup X 1 to Y 1 (X 2 to Y 2, and so on) so that the range of data in column X 1 ports over to a column in Y 2? (I hope what I wrote makes sense).
Sorry. For the last sentence, I meant to port the range of data in column X 1 onto Y 1.
I'm having issues with INDEX/MATCH using a large data set (180,000+ rows, 15 columns). The value in A2 is 40000001. The formula I am using is =INDEX($A$1:$O$74190,MATCH(A2,$L$1:$L$74190,0),15) and it results in a #N/A. However, when I change it to =INDEX($A$1:$O$74190,MATCH("40000001",$L$1:$L$74190,0),15) it pulls in the correct value. Why will it not recognize A2 as being 40000001?
good day, i'm using v lookup but want to try the Index Match. problem is i've got double dates because i work on 2 shifts. obviously if says #value. how can i make this work?
I have a table with a lot of data - need to take column A (product ID) and all of the MATCH Column A take and add all of the numbers from Column C (Qty) and Column D (price) and Place in new table with Product ID, Product Name, Total QTY, Total Price, and Average Price (( column B product description))
Hi
Great tutorial. I am unable to find a solution for an issue we have. I have tried combinations of SUMIF and VLOOKUP without success.
We have a roster built in Excel and this has a range of duties in rows as below
Date1 Date2 Date3 Date4 Date5
AD01 BN01 BN01 PH01 ML07
The codes refer to a number of sectors in a named range "Duties" and the number of sectors are in column 3 of that range. AD01 = 2, BN01 = 3, PH01 = 4, ML07 = 1
What I need is a sum that totals the row, so in the example above, the result will be 13 (2+3+3+4+1).
Any help will be appreciated.