0% found this document useful (0 votes)
114 views

How To Use Index and Match

xxx

Uploaded by

Readerbank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views

How To Use Index and Match

xxx

Uploaded by

Readerbank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

How to find data in an Excel table Page 1 of 7

How to find data in an Excel table


Applies to: Microsoft Office Excel 2003, Microsoft Office Excel 2007, Excel 2010

IN THIS TASK

• SUMMARY
• Create the Sample Worksheet
• Term Definitions
• Functions
• LOOKUP()
• VLOOKUP()
• INDEX() and MATCH()
• OFFSET() and MATCH()

Summary

This step-by-step article describes how to find data in a table (or range
of cells) by using various built-in functions in Microsoft Excel. You can
use different formulas to get the same result.

back to the top

Create the Sample Worksheet

This article uses a sample worksheet to illustrate Excel's built-in


functions, for example referencing a name from column A and
returning the age of that person from column C. To create this
worksheet, enter the following data into a blank Excel worksheet.

https://support.microsoft.com/en-us/help/324861/how-to-find-data-in-an-excel-table 7/26/2018
How to find data in an Excel table Page 2 of 7

You will type the value that you want to find into cell E2. You can type
the formula in any blank cell in the same worksheet.
A B C D E
Find
1 Name Dept Age
Value
2 Henry 501 28 Mary
3 Stan 201 19
4 Mary 101 22
5 Larry 301 29
back to the top

Term Definitions

This article uses the following terms to describe the Excel built-in
functions:
Term Definition Example
The whole lookup
Table_Array A2:C5
table.
The value to be found
Lookup_Value in the first column of E2
Table_Array.
Lookup_Array The range of cells that
-or- contains possible A2:A5
Lookup_Vector lookup values.
The column number
in Table_Array the
3 (third column in
Col_Index_Num matching value
Table_Array)
should be returned
for.
A range that contains
only one row or
Result_Array
column. It must be
-or- C2:C5
the same size as
Result_Vector
Lookup_Array or
Lookup_Vector.
Range_Lookup A logical value (TRUE FALSE
or FALSE). If TRUE or
omitted, an

https://support.microsoft.com/en-us/help/324861/how-to-find-data-in-an-excel-table 7/26/2018
How to find data in an Excel table Page 3 of 7

approximate match is
returned. If FALSE, it
will look for an exact
match.
This is the reference
from which you want
to base the offset.
Top_Cell must refer to
Top_Cell a cell or range of
adjacent cells.
Otherwise, OFFSET
returns the #VALUE!
error value.
This is the number of
columns, to the left or
right, that you want
the upper-left cell of
the result to refer to.
For example, "5" as
the Offset_Col
argument specifies
that the upper-left
cell in the reference is
Offset_Col
five columns to the
right of reference.
Offset_Col can be
positive (which means
to the right of the
starting reference) or
negative (which
means to the left of
the starting
reference).
back to the top

Functions

LOOKUP()

The LOOKUP function finds a value in a single row or column and


matches it with a value in the same position in a different row or
column.

https://support.microsoft.com/en-us/help/324861/how-to-find-data-in-an-excel-table 7/26/2018
How to find data in an Excel table Page 4 of 7

The following is an example of LOOKUP formula syntax:


=LOOKUP(Lookup_Value,Lookup_Vector,Result_Vector)

The following formula finds Mary's age in the sample worksheet:


=LOOKUP(E2,A2:A5,C2:C5)
The formula uses the value "Mary" in cell E2 and finds "Mary" in the
lookup vector (column A). The formula then matches the value in the
same row in the result vector (column C). Because "Mary" is in row 4,
LOOKUP returns the value from row 4 in column C (22).

Note The LOOKUP function requires that the table be sorted.


For more information about the LOOKUP function, click the
following article number to view the article in the Microsoft
Knowledge Base:

324986 How to use the LOOKUP function in Excel

back to top

VLOOKUP()

The VLOOKUP or Vertical Lookup function is used when data is listed


in columns. This function searches for a value in the left-most column
and matches it with data in a specified column in the same row. You
can use VLOOKUP to find data in a sorted or unsorted table. The
following example uses a table with unsorted data.

The following is an example of VLOOKUP formula syntax:


=VLOOKUP
(Lookup_Value,Table_Array,Col_Index_Num,Range_Lookup)
The following formula finds Mary's age in the sample worksheet:
=VLOOKUP(E2,A2:C5,3,FALSE)
The formula uses the value "Mary" in cell E2 and finds "Mary" in the
left-most column (column A). The formula then matches the value in
the same row in Column_Index. This example uses "3" as the
Column_Index (column C). Because "Mary" is in row 4, VLOOKUP
returns the value from row 4 in column C (22).
For more information about the VLOOKUP function, click the
following article number to view the article in the Microsoft

https://support.microsoft.com/en-us/help/324861/how-to-find-data-in-an-excel-table 7/26/2018
How to find data in an Excel table Page 5 of 7

Knowledge Base:

181213 How to Use VLOOKUP or HLOOKUP to find an exact


match

back to the top

INDEX() and MATCH()

You can use the INDEX and MATCH functions together to get the
same results as using LOOKUP or VLOOKUP.

The following is an example of the syntax that combines INDEX and


MATCH to produce the same results as LOOKUP and VLOOKUP in the
previous examples:
=INDEX(Table_Array,MATCH
(Lookup_Value,Lookup_Array,0),Col_Index_Num)

The following formula finds Mary's age in the sample worksheet:


=INDEX(A2:C5,MATCH(E2,A2:A5,0),3)
The formula uses the value "Mary" in cell E2 and finds "Mary" in
column A. It then matches the value in the same row in column C.
Because "Mary" is in row 4, the formula returns the value from row 4 in
column C (22).

Note If none of the cells in Lookup_Array match Lookup_Value


("Mary"), this formula will return #N/A.
For more information about the INDEX function, click the
following article number to view the article in the Microsoft
Knowledge Base:

324988 How to use the INDEX function to find data in a


table

back to the top

OFFSET() and MATCH()

You can use the OFFSET and MATCH functions together to produce
the same results as the functions in the previous example.

https://support.microsoft.com/en-us/help/324861/how-to-find-data-in-an-excel-table 7/26/2018
How to find data in an Excel table Page 6 of 7

The following is an example of syntax that combines OFFSET and


MATCH to produce the same results as LOOKUP and VLOOKUP:
=OFFSET(top_cell,MATCH
(Lookup_Value,Lookup_Array,0),Offset_Col)
This formula finds Mary's age in the sample worksheet:
=OFFSET(A1,MATCH(E2,A2:A5,0),2)
The formula uses the value "Mary" in cell E2 and finds "Mary" in
column A. The formula then matches the value in the same row but
two columns to the right (column C). Because "Mary" is in column A,
the formula returns the value in row 4 in column C (22).
For more information about the OFFSET function, click the
following article number to view the article in the Microsoft
Knowledge Base:

324991 How to use the OFFSET function

back to the top

Last Updated: May 14, 2018

Can't find what you're looking for?

What's new Store & Education Enterprise Developer Company


Support
NEW Surface Go Microsoft in Microsoft Azure Microsoft Careers
Account profile education Visual Studio
Surface Book 2 Enterprise About
Download Office for Windows Dev Microsoft
Surface Pro Center students Data platform Center
Company news
Xbox One X Sales & Office 365 for Find a solution Developer
support schools provider Network Privacy at
Xbox One S Microsoft

https://support.microsoft.com/en-us/help/324861/how-to-find-data-in-an-excel-table 7/26/2018
How to find data in an Excel table Page 7 of 7

Returns Deals for Microsoft partner TechNet


VR & mixed students & resources Investors
reality Order tracking parents Microsoft
Microsoft developer Diversity and
Windows 10 apps Store locations Microsoft AppSource program inclusion
Azure in
Office apps Support education Manufacturing & Channel 9 Accessibility
resources
Buy online, pick Office Dev Security
up in store Financial services Center

English (United States)

Contact us Terms of use Privacy & cookies Trademarks © Microsoft 2018

https://support.microsoft.com/en-us/help/324861/how-to-find-data-in-an-excel-table 7/26/2018

You might also like