Excel - Power User
Excel - Power User
MICROSOFT EXCEL -
POWER USER
Contact us at Learn iT!
(415) 693-0250
www.learnit.com
MICROSOFT EXCEL
Using the Index and Match Functions: Looking at the MATCH Function
Many have heard of, if not used, a VLOOKUP function to retrieve Independently:
data from a list or table based on a single key data value.
The MATCH function arguments:
However, the VLOOKUP function has limitations, which can be
=MATCH(Lookup Value, Lookup Array, Match Type)
overcome by retrieving data using a different set of functions
called INDEX & MATCH. Purpose:
The function looks for a value in an array, and then returns the
Limitations to VLOOKUP That Can Be row number of the array in which the value was found.
Overcome with INDEX & MATCH: Lookup Value:
■■ A VLOOKUP can only look for a single data value (such as a The value you want MATCH to look for.
Part Number or a Customer ID) in a table or list in which it
Lookup Array:
can retrieve other data values from the same record.
The range of cells you want MATCH to search as it looks for the
▶▶ INDEX & MATCH, when used as an array function, can Lookup Value.
look up multiple data values.
■■ The lookup value that VLOOKUP searches for in a table array Match Type:
must be located to the left of any columns of data you want This determines if MATCH looks for an exact match or a closest
to retrieve. possible match (enter “0” for exact matches).
▶▶ With INDEX & MATCH, the lookup value can be in any Example 1:
column of the table array—to the left or right of the
The MATCH function will look for the value in cell A11 (1003) in
actual data being retrieved.
the array A2:A7 and then return the row number of the array in
which the value was found.
Looking at the INDEX Function
Independently:
Cell A11
The INDEX function arguments:
=INDEX(Array, Row Number)
Purpose:
The function returns a data value from an array of values from a
specific row within the array.
Array:
The range of data from which you want to return a value.
INDEX and MATCH
Row Number: Sample Data
The row number of the array that contains the actual data value
you want returned.
Using INDEX and MATCH together:
Example 1:
The INDEX function will retrieve the data value in row 3 from the Goal:
array C2:C7 (Product). One can use the INDEX function to retrieve a data value from an
array, where MATCH is used to look up the key value in an array
and determine the row number the value is in. MATCH will then
pass this information on to the row number argument of the
INDEX function.
The Problem:
By itself, INDEX is not very efficient or effective. This is because
the row number containing the actual value to be returned has to
be known for this function. For example, in Example 1, we would
have to know that ID 1003 is in row 3 of the array by looking it up
ourselves and entering in “3” for the row number argument of
the function. Looking up the value manually defeats the whole
purpose of the function! We need another function that looks up
the row number for our criteria automatically… and that’s where
MATCH comes in!
02
MICROSOFT EXCEL
Array Formulas:
If you’ve done even a little programming, you’ve probably run across the term array. For our purposes, an array is just a collection of items.
In Excel, those items can reside in a single row (called a one-dimensional, horizontal array), a column (a one-dimensional, vertical array),
or multiple rows and columns (a two-dimensional array). You can’t create three-dimensional arrays or array formulas in Excel.
An array formula is a formula that can perform multiple calculations on one or more of the items in an array. Array formulas can return
either multiple results or a single result. For example, you can place an array formula in a range of cells and calculate a column or row
of subtotals. You can also place a formula in a single cell and calculate a single amount. An array formula that resides in multiple cells is
called (logically enough) a multi-cell formula, and an array formula that resides in a single cell is called a single-cell formula.
Inserting Names:
■■ By using Named Ranges, you can reference a single cell or a range of cells by name. You can also use formulas and functions to
provide the source data that the Named Range refers to.
■■ To create a new Named Range
▶▶ Click the Formulas tab of the Ribbon, and in the Define Name group, click the Define Name button.
▶▶ Type the new name in the Name: box, define the Scope of the range, and use a cell range or a formula to determine the values
the name refers to in the Refers to: Area.
03
MICROSOFT EXCEL
Using the OFFSET Function: Creating a Named Range with OFFSET:
■■ Purpose: to reference a single cell or a range of cells, which ■■ Goal: We want to dynamically reference a range of month
may start a certain number of rows and/or columns away names for use as labels in a chart. As months are added
from the initial cell reference, and may consist of a single or removed, we want the named range to automatically
cell or a range of cells consisting of multiple rows and/or update within the chart.
columns of data ■■ Create a new Name by clicking the Define Name button
■■ =OFFSET(Reference, Rows, Cols, Height, Width) (Formulas tab of the Ribbon) and type in “Months” for the
▶▶ Reference = the initial cell reference, or “anchor” cell, name.
from which to start ■■ In the Refers to: area, insert an OFFSET that will start
▶▶ Rows = the number of cells up or down from the with cell A2 and capture any cells below that may
anchor cell reference you want to begin referencing. also contain references to months. Though you may
Use positive numbers to move down, and negative have absolute cell references and references to sheet
numbers to move up. names, the resulting function should look similar to this:
▶▶ Cols = the number of cells to the right or to the left =OFFSET(A2,0,0,COUNTA(A:A),1).
from the anchor cell reference you want to begin ■■ In the above example, the reference cell, or “anchor” cell, is
referencing. Use positive numbers to move right and A2.
negative numbers to move left. ■■ The reference starts with that actual cell. Because ROWS &
▶▶ Height = how many rows tall the reference should be COLS are both set to 0, our starting point is not adjusted
■■ Often times the COUNT or COUNTA functions may be used a certain number of rows or columns away from the initial
to count how many data values are present within a range reference cell.
and to set the Height argument to equal that same amount. ■■ The height of the range is determined by the result of the
▶▶ Width = how many columns wide the reference should COUNTA function counting data values in all of column A.
be. ■■ The width of the range is 1 column.
Example:
Using the image of the range to the right,
=OFFSET(A1,3,1,3,1) would reference the
range B4:B6.
Start with cell A1. Move 3 cells down and 1 cell
to the right, and select a range 3 rows deep
and 1 column wide.
04