0% found this document useful (0 votes)
122 views29 pages

Excel Lookup Formulas Guide

This document discusses lookup formulas and array formulas in Excel. It introduces the VLOOKUP and HLOOKUP functions for performing vertical and horizontal lookups to return values from a table. It also covers the MATCH function for finding the position of a cell that matches a value. The document explains how to create array formulas that perform calculations across multiple cells using functions like SUM and how special rules apply when editing array formulas.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views29 pages

Excel Lookup Formulas Guide

This document discusses lookup formulas and array formulas in Excel. It introduces the VLOOKUP and HLOOKUP functions for performing vertical and horizontal lookups to return values from a table. It also covers the MATCH function for finding the position of a cell that matches a value. The document explains how to create array formulas that perform calculations across multiple cells using functions like SUM and how special rules apply when editing array formulas.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Course : ACCT6300 –

Introduction to Accounting
(Lab)
Effective Period : September 2018

Creating Formulas that


Lookup Values

Session 3
INTRODUCING LOOKUP
FORMULAS
• A lookup formula essentially returns a value from a
table by looking up another related value.

• A common telephone directory provides a good


analogy. If you want to find a person’s telephone
number, you first locate the name (look it up) and
then retrieve the corresponding number.
FUNCTIONS RELEVANT
TO LOOKUPS
• VLOOKUP Vertical lookup.
Searches for a value in the first column of a table and
returns a value in the same row from a column you
specify in the table.
• HLOOKUP Horizontal lookup.
Searches for a value in the top row of a table and
returns a value in the same column from a row you
specify in the table.
DEFINE TABLES NAME

1. Open both the workbook that will contain the link


(called the destination workbook), and the
workbook that contains the data you want to link to
(called the source workbook).
2. In the destination workbook, point to Name on the
Insert menu, and then click Define.
3. In the Names in workbook box, enter the name for
the link.
4. Delete the contents of the Refers to box, and keep
the cursor in the box.
DEFINE TABLES NAME

5. On the Window menu, click the name of the source


workbook, and then click the worksheet that
contains the cells you want to link to.
6. Select the cell or range of cells you want to link to.
7. In the Define Name dialog box, click Add.
LOOKUP FORMULAS
(VLOOKUP)
• The VLOOKUP function looks up the value in the first
column of the lookup table and returns the
corresponding value in a specified table column.

• The lookup table is arranged vertically (which explains


the V in the function’s name).

• The syntax for the VLOOKUP function is :

VLOOKUP(lookup_value,table_array,col_index_num,r
ange_lookup
LOOKUP FORMULAS
(VLOOKUP)
The VLOOKUP function’s arguments are as follows:
– Lookup_value
The value to be looked up in the first column of the lookup table.
– Table_array
The range that contains the lookup table.
– Col_index_num
The column number within the table from which the matching value is
returned.
– Range_lookup
Optional. If TRUE or omitted, an approximate match is returned. (If an
exact match is not found, the next largest value that is less than
lookup_value is returned.) If FALSE, VLOOKUP will search for an exact
match. If VLOOKUP can’t find an exact match, the function returns #N/A
LOOKUP FORMULAS
(VLOOKUP)
Temperat
Density Viscosity ure
0.457 3.55 500
0.525 3.25 400
=VLOOKUP(1,A2:C3,3,TRUE)
400
=VLOOKUP(1,A2:C3,3,FALSE)
#N/A
LOOKUP FORMULAS
(HLOOKUP)
• The HLOOKUP function works just like the VLOOKUP
function except that the lookup table is arranged
horizontally instead of vertically.

• The HLOOKUP function looks up the value in the first


row of the lookup table and returns the corresponding
value in a specified table row.

• The syntax for the HLOOKUP function is

HLOOKUP(lookup_value,table_array,row_index_num,
range_lookup)
LOOKUP FORMULAS
(HLOOKUP)
The HLOOKUP function’s arguments are as follows
– Lookup_value: The value to be looked up in the first row of the
lookup table.
– Table_array: The range that contains the lookup table.
– Row_index_num: The row number within the table from which
the matching value is returned.
– Range_lookup: Optional. If TRUE or omitted, an approximate
match is returned. (If an exact match is not found, the next
largest value less than lookup_value is returned.) If FALSE,
VLOOKUP will search for an exact match. If VLOOKUP can’t find
an exact match, the function returns #N/A
LOOKUP FORMULAS
(HLOOKUP)

Axles Bearings Bolts


4 4 9
5 7 10
6 8 11

=HLOOKUP("Axles",A1:C4,2,TRUE)
4
Combination
111-678Jakarta
=HLOOKUP(VALUE(MID(A1,2,1
)),A5:C6,2,0)

Rek Bank 1 2
No.Rek Jakarta Bogor
IF FUNCTIONS
• Returns one value if a condition you specify evaluates
to TRUE and another value if it evaluates to FALSE.

• Syntax
IF(logical_test,value_if_true,value_if_false)
IF FUNCTIONS
• Example: IF (combination with left & right)

50 =IF(A1 <=100,"within within budget


budget","over budget")

J002 =IF(LEFT(A4,1)="J"," Manajemen


Manajemen","Lain")

02PAM =IF(RIGHT(A7,1)="J", None


"Manajemen",IF(RIG
HT(A7,1)="A","KA","
None"))
IF FUNCTIONS
FUNGSI AND

• Returns TRUE if all its arguments are TRUE; returns


FALSE if one or more argument is FALSE.

• Syntax
=AND(logical1,logical2, ...)
FUNGSI AND
50 TRUE
=AND(1<A1,A1<100)

=IF(AND(1<A1, 50
A1<100), A1, "The
value is out of range.")
FUNGSI OR
• Returns TRUE if any argument is TRUE; returns FALSE
if all arguments are FALSE.

• Syntax
=OR(logical1,logical2,...)

100 =OR(1<A1,A1<90) TRUE


=OR(100<A1,A1<90, FALSE
A1<1)
MATCH FUNCTIONS

• The MATCH function returns the relative position of


a cell in a range that matches a specified value.

• The syntax for MATCH is :


MATCH(lookup_value,lookup_array,match_type)
MATCH FUNCTIONS

• The MATCH function’s arguments are as follows:


– Lookup_value
The value you want to match in lookup_array. If
match_type is 0 and the lookup_value is text, this
argument can include wildcard characters “*” and “?”
– Lookup_array
The range being searched.
– Match_type
An integer (–1, 0, or 1) that specifies how the match is
determined
MATCH FUNCTIONS

• If match_type is 1, MATCH finds the largest value


less than or equal to lookup_value. (lookup_array
must be in ascending order)
• If match_type is 0, MATCH finds the first value
exactly equal to lookup_value.
• If match_type is –1, MATCH finds the smallest value
greater than or equal to lookup_value. (lookup_array
must be in descending order)
• If you omit the match_type argument, this argument
is assumed to be 1.
ARRAY FORMULAS
One of Excel’s most interesting (and most powerful)
features is its ability to work with arrays in formulas.

When you understand this concept, you’ll be able to


create elegant formulas that appear to perform
spreadsheet magic.
ARRAY FORMULAS
• If you do any computer programming, you’ve
probably been exposed to the concept of an array. An
array is simply a collection of items operated on
collectively or individually. In Excel, an array can be
one dimensional or two dimensional.
• These dimensions correspond to rows and columns.
For example, a one dimensional array can be stored
in a range that consists of one row (a horizontal
array) or one column (a vertical array). A two-
dimensional array can be stored in a rectangular
range of cells. Excel doesn’t support three-
dimensional arrays (but its VBA programming
language does).
ARRAY FORMULAS
To create a single array formula to perform the
calculations, follow these steps:
1. Select a range to hold the results. In this case, the
range is D2:D7.
2. Enter the following formula: =B2:B7*C2:C7
3. Press Ctrl+Shift+Enter to enter the formula.
Normally, you press Enter to enter a formula.
Because this is an array formula, however, press
Ctrl+Shift+Enter.
ARRAY FORMULAS
Column D contains formulas to calculate the total for
each product.
ARRAY FORMULAS
• The following rules apply to multicell array formulas.
If you try to do any of these things, Excel lets you
know about it:
– You can’t change the contents of any individual cell that
makes up an array formula.
– You can’t move cells that make up part of an array formula
(but you can move an entire array formula).
– You can’t delete cells that form part of an array formula (but
you can delete an entire array).
ARRAY FORMULAS
– You can’t insert new cells into an array range. This rule includes
inserting rows or columns that would add new cells to an array
range.
– You can’t use multicell array formulas inside of a table that was
created by choosing Insert ➪ Tables ➪ Table. Similarly, you
can’t convert a range to a table if the range contains a multicell
array formula
ARRAY FORMULAS
• If an array formula occupies multiple cells, you must
edit the entire range as though it were a single cell.
The key point to remember is that you can’t change
just one element of an array formula.
• To edit an array formula, select all the cells in the
array range and activate the Formula bar as usual
(click it or press F2). Excel removes the brackets from
the formula while you edit it. Edit the formula and
then press Ctrl+Shift+Enter to enter the changes.
• All the cells in the array now reflect your editing
changes.
THANK YOU

You might also like