Excel: Using INDEX and MATCH

AID: 5511
  • Status: Published

1820 points

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directional lookup, adding an additional level of power to the formula.

How to use it:-
=INDEX([Index Array], [Optional Row to return], [Optional - Col to return])
=MATCH([Lookup value], [Lookup Array], 0)

(For the purposes of this article I am omitting the Area argument from index and using EXACT match type)

Index array - The range of values you want to return information from.
Row to return - Row number, within the array, to return the value from. If omitted row 1 will be used.
Col to return - Optional. The column, within the array, to return the value from. If omitted column 1 will be used.
Lookup Value - Value to match against.
Lookup Array - Range of values to match against

You use the MATCH formula to get your row, column or both. This will then get the appropriate data from the INDEX array.

I have attached an example spreadsheet. If you change the values in "V Value" and "H Value" you will see how it affects the result.

Why to use it:-
Because you don't have to sort the data within the range you want to search it is very useful for data that will grow dynamically. It also allow you to treat data as a true array within a single formula. So you can perform bi-directional lookups and store data points within different data ranges but with the same reference.

This could be extremely powerful if you need to store references to external source of data, for example. You have a table with the columns "Customer", "External Ref 1" & "External Ref 2". You can then have a summary sheet where the user can input the customer and without having to go searching and without the need for macros you can give the relevant external information.

Also because of this is two separate formula if you need to return several data elements the MATCH can be put into a separate cell. This reduces the number of calculation required when compaired to using V or HLOOKUP
Asked On
2011-05-16 at 07:29:03ID5511
Tags

Excel

,

INDEX

,

MATCH

,

VLOOKUP

,

HLOOKUP

Topic

Microsoft Excel Spreadsheet Software

Views
1068

Comments

Add your Comment

Please Sign up or Log in to comment on this article.

Join Experts Exchange Today

Gain Access to all our Tech Resources

Get personalized answers

Ask unlimited questions

Access Proven Solutions

Search 3.2 million solutions

Read In-Depth How-To Guides

1000+ articles, demos, & tips

Watch Step by Step Tutorials

Learn direct from top tech pros

And Much More!

Your complete tech resource

See Plans and Pricing

30-day free trial. Register in 60 seconds.

Loading Advertisement...

Top MS Excel Experts

  1. dlmille

    1,351,499

    Genius

    10,680 points yesterday

    Profile
    Rank: Genius
  2. ssaqibh

    542,555

    Sage

    0 points yesterday

    Profile
    Rank: Genius
  3. rorya

    381,757

    Wizard

    4,225 points yesterday

    Profile
    Rank: Savant
  4. imnorie

    334,112

    Wizard

    0 points yesterday

    Profile
    Rank: Genius
  5. teylyn

    282,850

    Guru

    20 points yesterday

    Profile
    Rank: Genius
  6. barryhoudini

    280,460

    Guru

    0 points yesterday

    Profile
    Rank: Genius
  7. redmondb

    235,511

    Guru

    2,000 points yesterday

    Profile
    Rank: Sage
  8. matthewspatrick

    230,947

    Guru

    2,010 points yesterday

    Profile
    Rank: Savant
  9. byundt

    197,840

    Guru

    820 points yesterday

    Profile
    Rank: Savant
  10. zorvek

    144,626

    Master

    0 points yesterday

    Profile
    Rank: Savant
  11. StephenJR

    136,537

    Master

    0 points yesterday

    Profile
    Rank: Genius
  12. nutsch

    117,005

    Master

    0 points yesterday

    Profile
    Rank: Genius
  13. gowflow

    110,036

    Master

    0 points yesterday

    Profile
    Rank: Sage
  14. MartinLiss

    107,333

    Master

    0 points yesterday

    Profile
    Rank: Wizard
  15. GlennLRay

    95,652

    Master

    0 points yesterday

    Profile
    Rank: Guru
  16. robhenson

    90,250

    Master

    0 points yesterday

    Profile
    Rank: Sage
  17. ScriptAddict

    88,470

    Master

    0 points yesterday

    Profile
    Rank: Guru
  18. kgerb

    85,022

    Master

    0 points yesterday

    Profile
    Rank: Wizard
  19. aikimark

    84,456

    Master

    3,310 points yesterday

    Profile
    Rank: Genius
  20. andrewssd3

    80,242

    Master

    0 points yesterday

    Profile
    Rank: Wizard
  21. Wiesje

    69,918

    Master

    0 points yesterday

    Profile
    Rank: Master
  22. Shanan212

    66,418

    Master

    0 points yesterday

    Profile
    Rank: Master
  23. krishnakrkc

    59,548

    Master

    0 points yesterday

    Profile
    Rank: Wizard
  24. Michael74

    54,744

    Master

    0 points yesterday

    Profile
    Rank: Wizard
  25. regmigrant

    51,070

    Master

    0 points yesterday

    Profile
    Rank: Guru

Hall Of Fame