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 229<br />

Figure 8-14: The formula in cell B2 returns the address in the Data range for the value in cell B1.<br />

If the Data range occupies a single row, use this formula to return the address of the Target value:<br />

=ADDRESS(ROW(Data),COLUMN(Data)+MATCH(Target,Data,0)-1)<br />

If the Data range contains more than one instance of the Target value, the address of the first<br />

occurrence is returned. If the Target value is not found in the Data range, the formula returns<br />

#N/A.<br />

Looking up a value by using the closest match<br />

The VLOOKUP and HLOOKUP functions are useful in the following situations:<br />

You need to identify an exact match for a target value. Use FALSE as the function’s<br />

fourth argument.<br />

You need to locate an approximate match. If the function’s fourth argument is TRUE or<br />

omitted and an exact match is not found, the next largest value that is less than the<br />

lookup value is used.<br />

But what if you need to look up a value based on the closest match? Neither VLOOKUP nor<br />

HLOOKUP can do the job.<br />

Figure 8-15 shows a worksheet with student names in column A and data values in column B. Range<br />

B2:B20 is named Data. Cell E2, named Target, contains a value to search for in the Data range. Cell<br />

E3, named ColOffset, contains a value that represents the column offset from the Data range.

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

Saved successfully!

Ooh no, something went wrong!