Excel Chapter - 13

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

PM2 - Management Reporting – IT Office Tools (MS Excel)

Chapter - 13
Using Lookup Functions and Formula Auditing:
Use Lookup Functions:
Use Excel’s Lookup & Reference functions to locate values in rows or columns of data.

This table lists some of the Lookup & Reference Functions available in Excel 2013.

Overview of Lookup & Reference Functions

COLUMN =COLUMN(reference) Returns the column number of a


COLUMNS =COLUMNS(array) reference.
Returns the number of columns in an
array or reference.
HLOOKUP =HLOOKUP(lookup_value, Looks for a value in the top row of a
table_array, row_index_num, table or array of values and returns the
range_lookup) value in the same column from a row
specified.
LOOKUP =LOOKUP(…) Looks up a value either from a one-row
or one-column range or from an array.
Provided for backward compatibility.
ROW =ROW(reference) Returns the row number of a reference.
ROWS =ROWS(array) Returns the number of rows in a
reference or array.
TRANSPOSE =TRANSPOSE(array) Converts a vertical range of cells as a
horizontal range, or vice versa.
VLOOKUP =VLOOKUP(lookup_value,tabl Looks for a value in the leftmost column
e_array,col_index_num, of a table, and then returns a value in
range_lookup) the same row from a column specified.
By default, the table must be sorted in
an ascending order.

The VLOOKUP Function:


The VLOOKUP function loo:ks up information in a worksheet. The VLOOKUP searches
vertically down the left most column of a cell range until it finds the value specified. When
it finds the specified value, it then looks across the row and returns the value in column
specified.
PM2 - Management Reporting – IT Office Tools (MS Excel)

Tip:

 It’s important to understand that VLOOKUP only looks down the column that is farthest left
in the specified cell range. In then looks across the row.

1. Click the Insert Function button on the Formula bar.

The Insert Function dialog box appears.

2. Click the Or select a category list arrow and select Lookup and Reference
Reference.

3. Select VLOOKUP in the Select a function box and click OK.

4. Enter the required arguments for the VLOOKUP function. Other Ways to Use the
VLOOKUP Function in a Formula:
Write the formula using the syntax =VLOOKUP

(lookup_value, table_array, col_index_num) Tip:


 The HLOOKUP function is similar to the VLOOKUP
function, except it searches horizontal from left to right across the top row of a cell range
until it finds the value specified. When it finds the specified value it then looks down the
column to find the specified value. Because of the way data is typically structured,
VLOOKUP is much more powerful than HLOOKUP.

When Excel comes across a formula that it cannot calculate, it displays an error value.
Error values occur because of incorrectly written formulas, referencing cells or data that
don’t exist, or breaking the fundamental laws of mathematics. Excel includes an Error
Checking feature to help deal with errors.

1. Click the Formulas tab on the Ribbon and click the Error Checking button in the
Formula Auditing group.

The Error Checking dialog box also has several buttons to help with errors:

• Help on this error: Displays a Help topic that explains the type of error being seen.
PM2 - Management Reporting – IT Office Tools (MS Excel)

• Show Calculation Steps: Displays the Evaluate Formula dialog box, which breaks down
the formula arguments so that the error can be isolated. Click Evaluate to show the

current value of the underlined argument or click Step In to examine the source of a
particular argument.

• Ignore Error: Allows the current error to be skipped and move to the next error in the
worksheet.

• Edit in Formula Bar: Places the cursor in the formula bar, where the formula arguments
can be directly edited and the error fixed.

Tip: Click the Previous or Next buttons to move between errors in the worksheet, and
click the Options button to change the error checking rules. Other Ways to display

the Evaluate Formula Dialog Box:


Click the Evaluate Formula button in the Formula Auditing group.

2. Click the button to use in the Error Checking dialog box.

Now follow Excel’s advice to fix the error.

Other Ways to Fix an Error:


Select the cell that contains an error and point to the SmartTip icon that appears next to
the cell. A tip appears, telling why this type of error is appearing. Click the list arrow and
select an error checking option.

Tips:

 Another way to analyze errors is by tracing them with arrows. Select a cell with an error,
click the Error Checking list arrow in the Formula Auditing group, and select Trace

Error. Arrows appear, pointing out the cells that are involved in the erroneous formula.

 If a formula contains its own cell location as a reference, it results in a circular reference,
and the formula can’t calculate correctly. To locate circular references in the worksheet,
click the Error Checking list arrow in the Formula Auditing group, point to Circular

References, and select a cell that contains a circular reference from the list.
PM2 - Management Reporting – IT Office Tools (MS Excel)

Excel Errors

##### The numeric value is too wide to display within the cell. Resize the
column by dragging the boundary line between the column headings.
#VALUE! A mathematical formula that references a text entry was entered
instead of a numerical entry.
#DIV/0! An attempt was made to divide number by zero. This error often
occurs when creating a formula that refers to a blank cell as a divisor.
#NAME? Excel doesn’t recognize text entered in a formula. The name or
function may have been misspelled, or a deleted name typed. Text in
a formula without enclosing the text in double quotation marks may
also have been entered.
#N/A This error occurs when a value is not available to a function or a
formula. If certain cells on the worksheet contain data that is not yet
available, enter #N/A in those cells. Formulas that refer to those cells
will then return #N/A instead of attempting to calculate a value.
#REF! The #REF! Error value occurs when a cell reference is not valid. A cell
range was probably deleted that is referenced in a formula.
#NUM! The #NUM! Error value occurs when using an invalid argument in a
worksheet function.
#NULL! Specified intersections of two ranges in a formula do not intersect.

Trace Cells:
By default, Excel displays the results of formulas in the worksheet instead of showing the
actual formulas. To understand the calculations and the work that goes into the results,
use the Watch Window to trace precedents and dependents.

Display formulas:

1. Click the Formulas tab on the Ribbon and click the Show Formulas button in the
Formula Auditing group.

Tip: Display formulas and then select a cell that


contains a formula; colored lines appear around cells that are referenced by the formula.

Now hide the formulas again.


PM2 - Management Reporting – IT Office Tools (MS Excel)

2. Click the Show Formulas button in the Formula Auditing group again.

Tip: Print a worksheet with formulas displayed and the formulas print instead of values.

Trace formula precedents and dependents:


Trace the influence of formulas by displaying arrows that show precedent and dependent
cells.

1. Select a cell that contains a formula to trace.

2. Click the Formulas tab on the Ribbon.

In the Formula Auditing group, there are a couple different buttons to choose from:

• Trace Precedents: Displays arrows that show what cells affect the currently selected
cell.

• Trace Dependents: Displays arrows that point to cells that are affected by the currently
selected cell.
3. Click the Trace Precedents or Trace Dependents button in the Formula Auditing

group.
Arrows appear, illustrating how the cells relate to the formula in the currently selected
cell. Dots appear on the arrows to point out which specific cells are involved. If there are
precedents or dependents on another worksheet, an icon appears saying that.

Once done analyzing formulas, remove the arrows.


4. Click the Remove Arrows button in the Formula Auditing group.

Tip: To remove only precedent arrows or only dependent arrows, click the Remove
Arrows button list arrow and select an option.

Watch and Evaluate Formulas:


Use the Watch Window:
The Watch Window allows the values of certain cells to be monitored as changes are made
to worksheets.
PM2 - Management Reporting – IT Office Tools (MS Excel)

1. Click the Formulas tab on the Ribbon and click the Watch Window button in the

Formula Auditing group.

2. Click the Add Watch button.

The Add Watch dialog box appears.

3. Select the cell or cell range to watch and click Add.

The workbook and worksheet names, defined name, cell reference, current value, and
formula for the selected cell(s) appear in the Watch Window.

Tip: If no longer wanting to track a certain cell, select it in the Watch Window and click
the Delete Watch button.

You might also like