How to Use Excel‘s INDEX/MATCH Formula With Multiple Criteria

How to Use Excel‘s INDEX/MATCH Formula With Multiple Criteria

Excel is a powerful tool for organizing and analyzing data, but it takes some skill to fully leverage its capabilities. Learning how to use formulas like INDEX/MATCH can help you be more efficient and effective in your work.

In this post, I‘ll explain how the INDEX and MATCH functions work on their own and in combination. Then I‘ll walk through a detailed example of using INDEX/MATCH with multiple criteria. I‘ll also discuss some common use cases, share tips and best practices, and explain how to troubleshoot issues you might encounter.

By the end of this guide, you‘ll have a comprehensive understanding of how to use INDEX/MATCH with multiple criteria to look up data in Excel. Let‘s dive in!

Understanding INDEX and MATCH

Before we get into the step-by-step tutorial, let‘s cover what the INDEX and MATCH functions do on their own:

The INDEX function returns a value at a given position within a range. You provide a range of cells, along with a row number and column number, and INDEX will return the value at those coordinates.

For example, =INDEX(A1:C10, 2, 3) would return the value in the 2nd row and 3rd column of the range A1:C10.

The MATCH function searches for a specified item in a range and returns its relative position. MATCH takes three arguments:

  1. The value to search for
  2. The range to search in
  3. The match type (exact match, less than, or greater than)

For instance, =MATCH("apples",A1:A10,0) would search the range A1:A10 for the text "apples" and return the row number where it appears.

When you nest MATCH inside of INDEX, you can dynamically look up values based on search criteria. Instead of providing numerical row and column numbers to INDEX, you use MATCH to locate the right row and column based on a search.

This allows you to perform more advanced lookups than what‘s possible with a formula like VLOOKUP. With INDEX/MATCH, you can look leftwards in a table, match based on multiple criteria, and more. Let‘s see how it works!

How to Use INDEX/MATCH with Multiple Criteria

Now let‘s walk through a real example of using INDEX/MATCH with multiple criteria in Excel. Consider a spreadsheet containing data on products:

To look up the price for a specific product based on multiple attributes, we can use an INDEX/MATCH formula. Here are the steps:

  1. Set up named ranges
    First, it‘s a good idea to name your data ranges. This will make your formulas more readable. Here, I‘ll create named ranges for each column:


  1. Enter your lookup values
    In separate cells, enter the values you want to search for. For this example, I want to find the price for a product with ID 789 in the Laptops category.
  1. Construct the formula
    Now we can build our INDEX/MATCH formula. We‘ll use INDEX to return a value from the Prod_Price column, and MATCH to locate the right row based on the Prod_ID and Prod_Category columns.

The formula looks like this:

=INDEX(Prod_Price, MATCH(1, (Prod_ID=H2)*(Prod_Category=H3), 0))

Here‘s what each part does:

Prod_Price – The range to return a value from.

MATCH(1, – Look for the value 1 in the following array. The 1 is a clever trick that matches when all criteria are true.

(Prod_ID=H2)(Prod_Category=H3) – An array that evaluates to 1 when the Prod_ID matches H2 AND the Prod_Category matches H3. The serves as an "AND" operator for the two logical tests.

    • Match type 0 for an exact match.

Since this is an array formula, you must press Ctrl+Shift+Enter to calculate it properly. The curly braces around the formula indicate it‘s an array formula.

And there you have it! The formula searches for a row where the Prod_ID is 789 and the Prod_Category is Laptops, finds that in row 11, and returns the corresponding price of $1,299.

You can easily modify the formula to match based on other columns, look in a different range for the result, or tweak it in other ways. This example illustrates the fundamental technique that you can adapt for your own uses.

Common Use Cases

Now that you understand conceptually how INDEX/MATCH works with multiple criteria, let‘s discuss some common scenarios where you might apply this technique:

Invoices – Look up prices based on complex product configurations, like an item SKU and preferred vendor. Automatically populate prices on invoices by matching multiple attributes.

Reporting – Summarize metrics for specific cohorts, like sales for customers in a given region and industry. Build executive dashboards that focus on cross-sections of data.

Budgeting – Estimate costs for projects with many variables, such as materials, labor, and duration. Perform "what-if" analysis with ease using data tables.

Pricing – Retrieve customized pricing for clients based on multiple factors, like volumes, discounts, and contract terms. Quickly generate quotes without manual lookups.

Scheduling – Assign resources to tasks based on skills, availability, location, and other criteria. Automate staff scheduling to optimize utilization.

Hopefully these examples spark some ideas for how you can use INDEX/MATCH with multiple criteria in your own work! With some creativity, the applications are endless.

Tips and Best Practices

To wrap up, here are some tips and best practices to keep in mind when using INDEX/MATCH with multiple criteria:

Set up your data as a table with headers. This will make it easier to reference the data ranges in your formulas.

Use named ranges to make your formulas more readable and maintainable. Give your ranges descriptive names.

If you get unexpected results, evaluate each part of the formula step-by-step. Check that the MATCH is finding the right row.

The more criteria you match on, the more specific the results will be. Start simple and add more criteria as needed.

If you need to match based on a partial text string, you can use wildcards like * in your MATCH criteria.

INDEX/MATCH can get slow on very large datasets. For heavy-duty lookups, consider using Power Query or helper columns instead.

Always test your formulas with sample data before relying on them for actual analysis. Verify the results are what you expect.

Advantages Over VLOOKUP

You might be wondering how INDEX/MATCH compares to other lookup formulas in Excel, like VLOOKUP. While VLOOKUP is simpler and more widely known, INDEX/MATCH offers several key advantages:

You can look to the left. VLOOKUP requires your lookup column to be the leftmost in the range. INDEX/MATCH can look in any column.

You don‘t need to count columns. With VLOOKUP, you provide a column index number. INDEX/MATCH uses the header name directly.

It‘s more flexible. INDEX/MATCH can handle multiple criteria, horizontal lookups, and other advanced configurations. VLOOKUP is limited to a single vertical lookup.

It‘s less error-prone. If you insert or delete a column, VLOOKUP formulas will break. INDEX/MATCH is more resilient to changes in the data layout.

It‘s usually faster. On larger datasets, INDEX/MATCH can calculate more quickly than VLOOKUP.

For these reasons, many Excel experts recommend INDEX/MATCH as the superior lookup formula, especially when working with multiple criteria. It‘s worth investing the time to learn it!

In Conclusion

We covered a lot of ground in this guide to using INDEX/MATCH with multiple criteria in Excel! You learned how the INDEX and MATCH functions work, how to combine them to look up data based on multiple conditions, and tips and best practices to use them effectively.

INDEX/MATCH is one of the most powerful tools to have in your Excel toolbox. With practice, you‘ll gain confidence in constructing formulas for even the trickiest lookup problems. You‘ll be able to transform messy data into actionable insights faster than ever before.

Equipped with this knowledge, you‘re ready to tackle spreadsheets head-on and uncover new opportunities in your data. The more you use INDEX/MATCH, the more uses you‘ll discover for it. Get creative and see what insights you can unlock!

Additional Resources
Want to learn more about lookups and other advanced Excel techniques? Check out these resources:

The Definitive Guide to Using INDEX/MATCH
10 Excel Formulas Every Data Analyst Should Know
Advanced Excel Tips Weekly Email Course
Online Excel Formulas Bootcamp
How to Use VLOOKUP in Excel: A Step-by-Step Tutorial
Build Powerful Dashboards with INDEX/MATCH

Feel free to try example spreadsheets and test your skills! With practice, you‘ll be an Excel lookup wizard in no time.