Using INDEX MATCH

The INDEX MATCH function is one of Excel's most powerful features. The older brother of the much-used VLOOKUP, INDEX MATCH allows you to look up values in a table based off of other rows and columns. And, unlike VLOOKUP, it can be used on rows, columns, or both at the same time.

INDEX MATCH is so useful that many Excel pros use it to replace VLOOKUP entirely, never relying on the latter function. It appears frequently in spreadsheets, formulas, and even Excel interviews — so is a great formula to know for business analysts of any tenure.

Before we begin, it is important to realize that INDEX MATCH isn't actually a standalone function, but rather a combination of Excel's INDEX and MATCH functions. Read on to find out how to use them together to activate one of the most powerful tools Excel has to offer.

The INDEX function

We'll start with an overview of the INDEX function. Simply put, INDEX takes a cell range and returns a cell within that range based on a count provided by the user. The formula looks like this:

=INDEX(range, row_or_column)

That may sound a bit complicated, but it's actually easy once you see it in action. Take, for example, the following sheet:

Simple INDEX function example
=INDEX(C3:C5, 3)
Output: 9

In this example, the formula outputs the number 9, because the cell 3 spaces into the specified range contains the number 9.

Here's another example, in which we've changed the row_or_column parameter to 1:

Another INDEX formula example
=INDEX(C3:C5, 1)
Output: 15

In this example, the formula outputs the number 15, because the cell 1 space into the specified range contains the number 15.

Let's look at one more example, in which our range is a series of horizontal cells rather than vertical ones:

One more INDEX example
=INDEX(B2:C2, 2)
Output: "Sales (MM)"

As you can see, INDEX works exactly the same way, counting the number of cells we specify in our row_or_column parameter and outputting what it finds at the end of its search. In this case, this is the string "Sales (MM)".

This function may not seem particularly useful — and, used alone, it isn't — but when combined with MATCH, it becomes much more powerful.

Save an hour of work a day with these 5 advanced Excel tricks

Work smarter, not harder. Sign up for our 5-day mini-course to receive must-learn lessons on getting Excel to do your work for you.

  • How to create beautiful table formatting instantly...
  • Why to rethink the way you do VLOOKUPs...
  • Plus, we'll reveal why you shouldn't use PivotTables and what to use instead...

By submitting this information, you agree to Deskbright's privacy policy and terms of service.

The MATCH function

The MATCH function returns the position of a cell within an array by matching against a criteria string. The formula looks like this:

=MATCH(lookup_value, lookup_range, match_type)

Here's an example of MATCH in action:

Basic MATCH formula example
=MATCH("Cookies", B3:B5, 0)
Output: 3

In this example, the formula outputs the number 3, because the value "Cookies" is found 3 spaces into the specified lookup range.

Here's another example of MATCH used in a horizontal range:

Another MATCH formula example
=MATCH("Brownies", B3:F3, 0)
Output: 5

In this example, the formula outputs the number 5, because the value "Brownies" is found 5 spaces into the specified horizontal lookup range.

Putting it all together

So, how do we combine INDEX and MATCH to replace VLOOKUP? We feed the MATCH function into the row_or_column argument of the INDEX function like so:

=INDEX(range, MATCH(lookup_value, lookup_range, match_type))

Let's take a closer look at what's going on here. First, we call INDEX on a range of numbers from which we would like to look up a given value. Then, we use MATCH to tell Excel how many cells it should count into INDEX's range, based on a given value matched against a separate array.

That's a lot to digest, so let's take a look at an example to make things simpler. The following spreadsheet shows SnackWorld production by month. Let's say we want to look up how many Cookies were produced in March using the following table. We could do this easily using VLOOKUP, but let's try it with INDEX MATCH instead:

The INDEX MATCH formula combined
=INDEX(C3:C7, MATCH("March", B3:B7, 0)
Output: 37

In the example above, the formula outputs the number 37. Why?

First, we perform an INDEX on the Cookies produced column. How does Excel know how many cells to count down within the INDEX? It looks to MATCH, which is called on the Month column. MATCH finds the string given in the formula — "March" — three down on the list, so it pipes the number 3 back into the INDEX function, which counts down three cells and returns 37.

Let's try it again, this time with an example that will help demonstrate some of the more advanced functionality of INDEX MATCH. This time, we have a list of unit sales by category. Let's say we know one category sold 8 million units, but we're not sure which one. Let's use an INDEX MATCH to figure it out:

Another example of Excel's INDEX MATCH formula
=INDEX(B3:F3, MATCH(8, B4:F4, 0)
Output: "Gummy worms"

In this case, we're using the function on a horizontal range, and we're looking up something in a table header, rather than table data itself. However, INDEX MATCH still works well.

INDEX MATCH with wildcards

You can also use INDEX MATCH with wildcards to look up based on a partial phrase or string. Take a look at our tutorial on wildcards in Excel for more information.

Why INDEX MATCH is better than VLOOKUP

After all this, you may be wondering why we even bother using INDEX MATCH. Isn't VLOOKUP just as good?

Not quite. Here are a few reasons you might want to use INDEX MATCH instead:

  • You don't have to count. With INDEX MATCH, there's no more worrying about counting to figure out which column you need to pull from. You just select your lookup column and your results column, and you're done.
  • You can safely insert columns. With VLOOKUP, if you insert a column in between the start of your table and the column you want to reference, your formula will break — the column_index_number within your VLOOKUP won't update. INDEX MATCH, on the other hand, safely updates no matter where you insert columns.
  • You can lookup backwards. VLOOKUP only allows you to look up from columns that are in front of your starting point. Not so with INDEX MATCH — you can pull from any column you want to.
  • Separate formulas. Now you don't need to remember separate formulas for VLOOKUP and HLOOKUP.
  • More complex functionality. INDEX MATCH doesn't stop with the above tutorial. You can also use an INDEX MATCH MATCH to look up across both rows and columns, or use an INDEX MATCH with multiple criteria.

Now you know how to use INDEX MATCH! When you're finished reading, be sure to check out our overview of how to use Excel for more useful tools.

Save an hour of work a day with these 5 advanced Excel tricks

Work smarter, not harder. Sign up for our 5-day mini-course to receive must-learn lessons on getting Excel to do your work for you.

  • How to create beautiful table formatting instantly...
  • Why to rethink the way you do VLOOKUPs...
  • Plus, we'll reveal why you shouldn't use PivotTables and what to use instead...

By submitting this information, you agree to Deskbright's privacy policy and terms of service.

Comments

  • Getting started
  • Excel function basics
  • Mathematical functions
  • Dates and times
  • String functions
  • Lookup functions
    • How To Do A VLOOKUP: The Ultimate Guide
    • HLOOKUP tutorial
    • Using INDEX MATCH
    • Using INDEX MATCH MATCH
    • Using VLOOKUP with multiple values
    • INDEX MATCH with multiple criteria
  • Logical functions
  • Charts and graphs
  • PivotTables
  • Advanced formatting
  • Reference
  • Blog

哆哆女性网cartoontube关于小动物的作文猪宝宝起名喜用字的左晖老家是哪里开公司起名英文名起名器美咲唯孩子起名打分测试100许昌起名馆在哪里高氏起名字文具店起名茶汤歌词思起名字什么意思2022年属狗人的全年运势惠普电脑怎么样魔兽之冰封王座歌女红牡丹末日小说起名比较好的网站重生之步步仙路第七十三章钰慧破而后立王起名公司八字起什么名字好听鼠标连点店铺起名字3个字中国对韩国足球直播爱情真善美起名比较起名生辰八字网站黄婉秋淀粉肠小王子日销售额涨超10倍罗斯否认插足凯特王妃婚姻不负春光新的一天从800个哈欠开始有个姐真把千机伞做出来了国产伟哥去年销售近13亿充个话费竟沦为间接洗钱工具重庆警方辟谣“男子杀人焚尸”男子给前妻转账 现任妻子起诉要回春分繁花正当时呼北高速交通事故已致14人死亡杨洋拄拐现身医院月嫂回应掌掴婴儿是在赶虫子男孩疑遭霸凌 家长讨说法被踢出群因自嘲式简历走红的教授更新简介网友建议重庆地铁不准乘客携带菜筐清明节放假3天调休1天郑州一火锅店爆改成麻辣烫店19岁小伙救下5人后溺亡 多方发声两大学生合买彩票中奖一人不认账张家界的山上“长”满了韩国人?单亲妈妈陷入热恋 14岁儿子报警#春分立蛋大挑战#青海通报栏杆断裂小学生跌落住进ICU代拍被何赛飞拿着魔杖追着打315晚会后胖东来又人满为患了当地回应沈阳致3死车祸车主疑毒驾武汉大学樱花即将进入盛花期张立群任西安交通大学校长为江西彩礼“减负”的“试婚人”网友洛杉矶偶遇贾玲倪萍分享减重40斤方法男孩8年未见母亲被告知被遗忘小米汽车超级工厂正式揭幕周杰伦一审败诉网易特朗普谈“凯特王妃P图照”考生莫言也上北大硕士复试名单了妈妈回应孩子在校撞护栏坠楼恒大被罚41.75亿到底怎么缴男子持台球杆殴打2名女店员被抓校方回应护栏损坏小学生课间坠楼外国人感慨凌晨的中国很安全火箭最近9战8胜1负王树国3次鞠躬告别西交大师生房客欠租失踪 房东直发愁萧美琴窜访捷克 外交部回应山西省委原副书记商黎光被逮捕阿根廷将发行1万与2万面值的纸币英国王室又一合照被质疑P图男子被猫抓伤后确诊“猫抓病”

哆哆女性网 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化