11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 8: Using Lookup Functions 219<br />

The INDEX function returns a cell from a range. The syntax for the INDEX function is<br />

INDEX(array,row_num,column_num)<br />

The INDEX function’s arguments are as follows:<br />

array: A range<br />

row_num: A row number within the array argument<br />

column_num: A column number within the array argument<br />

If an array contains only one row or column, the corresponding row_num or column_<br />

num argument is optional.<br />

Figure 8-5 shows a worksheet with dates, day names, and amounts in columns D, E, and F. When<br />

you enter a date in cell B1, the following formula (in cell B2) searches the dates in column D and<br />

returns the corresponding amount from column F. The formula in B2 is<br />

=INDEX(F2:F21,MATCH(B1,D2:D21,0))<br />

Figure 8-5: Using the INDEX and MATCH functions to perform a lookup.<br />

To understand how this formula works, start with the MATCH function. This function searches the<br />

range D2:D21 for the date in cell B1. It returns the relative row number where the date is found.<br />

This value is then used as the second argument for the INDEX function. The result is the corresponding<br />

value in F2:F21.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!