Only.: Advanced Excel
Only.: Advanced Excel
va
lu
at
io
Advanced
Excel
on
ly
.
Sa
pl
e-
fo
TeachUcomp, Inc.
its all about you
Advanced Excel
Copyright:
io
on
ly
.
Copyright 2010 by TeachUcomp, Inc. All rights reserved. This publication, or any part thereof,
may not be reproduced or stored in a retrieval system, or transmitted in any form or by any means,
electronic, mechanical, recording, photocopying, or otherwise, without the express written permission of
TeachUcomp, Inc.
For PDF manuals, TeachUcomp, Inc. allows the owner of the PDF manual to make up to 2
additional copies of the PDF manual that the owner may place on up to 2 additional non-shared computer
hard drives for ease of use when using the accompanying CD-ROM tutorials. TeachUcomp, Inc. also grants
unlimited personal printing rights to the owner, strictly limited to the purposes of not-for-profit personal or
private education or research.
The unauthorized reproduction or distribution of this copyrighted work is illegal. Criminal copyright
infringement, including infringement without monetary gain, is investigated by the FBI and is punishable by
up to five years in federal prison and a fine of $250,000.
at
Trademark Acknowledgements:
Disclaimer:
e-
fo
re
va
lu
Windows, Windows 95, Windows 98, Windows Me, Windows XP, Windows Vista, Windows 7,
Microsoft Word 97, Microsoft Word 2000, Microsoft Word XP, Microsoft Word 2003, Microsoft Word 2007,
Microsoft Word 2010, Microsoft Excel 97, Microsoft Excel 2000, Microsoft Excel XP, Microsoft Excel 2003,
Microsoft Excel 2007, Microsoft Excel 2010, Microsoft Access 97, Microsoft Access 2000, Microsoft Access
XP, Microsoft Access 2003, Microsoft Access 2007, Microsoft Access 2010, Microsoft PowerPoint 97,
Microsoft PowerPoint 2000, Microsoft PowerPoint XP, Microsoft PowerPoint 2003, Microsoft PowerPoint
2007, Microsoft PowerPoint 2010, Microsoft Project 2007, Microsoft Project 2010, Microsoft Outlook 2000,
Microsoft Outlook XP, Microsoft Outlook 2003, Microsoft Outlook 2007, Microsoft Outlook 2010, Microsoft
Publisher 2000, Microsoft Publisher XP, Microsoft Publisher 2003, Microsoft Publisher 2007, Microsoft
Publisher 2010, Microsoft Office 97, Microsoft Office 2000, Microsoft Office XP, Microsoft Office 2003,
Microsoft Office 2007, Microsoft Office 2010, Microsoft Internet Explorer, and Microsoft Security Essentials
are registered trademarks of Microsoft Corporation. Other brand names and product names are trademarks
or registered trademarks of their respective holders.
Sa
pl
While every precaution has been made in the production of this book, TeachUcomp, Inc. assumes
no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of
the information contained herein. These training materials are provided without any warranty whatsoever,
including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. All
names of persons or companies in this manual are fictional, unless otherwise noted.
TeachUcomp, Inc.
Phone: (877) 925-8080
Web: http://www.teachucomp.com
TeachUcomp, Inc.
Advanced Excel
Sa
pl
e-
fo
re
va
lu
at
io
on
ly
.
TeachUcomp, Inc.
Advanced Excel
Sa
pl
e-
fo
re
va
lu
at
io
on
ly
.
TeachUcomp, Inc.
Advanced Excel
Table-Related Functions
27.1- The Hlookup and Vlookup Functions:
pl
e-
fo
re
va
lu
at
io
on
ly
.
Now you will examine some formulas that are commonly used when dealing with tables. The first
functions that we will discuss are in the Lookup & Reference function category. There are two primary
functions within this function set that are used to lookup table data. You can use these functions to lookup a
column value in a table and then return a corresponding column value from the same row. The first,
HLOOKUP, will look up a data value in a table that is structured in rows (with a header column on the
left). The second and more commonly used function, VLOOKUP, will lookup data values in a traditional
columnar table. Based on the layout of the table in which you are looking up data, you will need to use
either one or the other to lookup a data value in a table.
There are three required arguments and one optional fourth argument that you must know before
you can create a lookup function. Arguments are the additional pieces of information that a function
requires in order to be performed. First, you must know the lookup value. This is the value which you want
to lookup within the table. This is most commonly a cell reference. Second, you need to know the cell range
reference of the table in which you want to lookup the first value. This is called the table array. Third, you
need to know the column or row index number. This is the number of columns to the right of the leftmost
column, or the number of rows down from the top row of the table, within which Excel must look for the data
that you want it to return. The optional fourth argument is range lookup. This is a logical value (TRUE or
FALSE) which you can enter, if needed. If omitted, this argument is assumed to be TRUE. What it does
is specify whether or not you wish to perform a ranged lookup on the data within the database. If you need
to find an exact match on your data, often when you are looking up text values, you can insert FALSE for
the range lookup argument to find an exact match in the table.
For example, lets say that you have a columnar customer table in a worksheet. In that sheet, you
want to create a cell that will automatically lookup the customers address when you type the customers
company name in an adjacent cell. Assume that the first column of the table contains the customers
company names and the third column of the table contains the customers addresses. You can then write a
function that will take the value of the cell adjacent to it (the lookup value), compare it to the customer table
(the table array), lookup the customers company name in the first column until it finds a match, and then
count over three (3) columns (the column index number) to find the customers address! Since we want the
function to find an exact match on the customer name, we will then add the FALSE value to the range
lookup argument in this case.
After you created the formula, you could type a customer name into the cell that is being looked up
and the cell into which you had placed the formula would display the customers address after looking it up
in the table. In this case, we would use the VLOOKUP function because the example stated that we had a
traditional columnar table in which we were looking up the data. The syntax of a lookup function is either:
Sa
=VLOOKUP(lookup_value,table_array,column_index_number,range_lookup)
OR
=HLOOKUP(lookup_value,table_array,row_index_number,range_lookup)
When you are entering the table array value for the lookup function, it may be useful to assign it a
range name or make it an absolute reference. Named ranges are always assigned as absolute references
and this will ensure that the table array argument will not change if you copy and paste this formula. If you
dont use named ranges, you can assign the table array as an absolute reference by typing the dollar
symbol ($) before both the column reference letter and the row reference number for both cell references in
the range. Remember, if you dont do this, the lookup function may not work if you copy it to a new location.
TeachUcomp, Inc.
Advanced Excel
Table-Related Functions
27.2- Using the IF, AND, and OR Functions:
on
ly
.
We will now discuss Logical functions, which you can use to perform logical tests on the values in
cells and then return a result based on whether or not the value in the cell passed or failed the test. Logical
formulas take the form of an Ifthenelse statement. You must know at least three different arguments
before you can write a logical function: the logical test that you want to apply to the cell, the cell value or
formula to return if the test returns a TRUE value (or passes the logical test), and the cell value or
formula to return if the test returns a FALSE value (or fails the logical test). When you write logical
functions, they must have a certain syntax. That is:
=IF(logical_test,true_response,false_response)
va
lu
at
io
Note that if you want the formula to display a text response for the true response or the false
response, then you must place the response inside of double quotation marks ( ). If you want the cell to
display dates, these must be enclosed within pound signs (# #). The only time you wouldnt mark the type of
value to return is if you want the cell to display a numerical result or calculate a formula.
A nested logical function is one that places the cell through a second logical test if it fails the first.
These functions are useful for determining the value of a cell by placing it through several different tests,
displaying different results based on which test it passes. You can nest up to 64 additional IF statements
behind your original. The syntax for these are:
=IF(logical_test _1,true_response,IF(logical_test_2,true_response,false_response))
pl
e-
fo
re
You must remember to close all of the open parenthesis for every IF statement that you nest within
the logical function at the end of the formula. In this case since there are two IF statements, there are two
closing parentheses at the end of the formula.
Often it is the case that you will want to know if a cell meets multiple criteria. You can use the AND
and OR functions to find this out. The AND function will return a TRUE value if the cell being evaluated
passes all of the tests listed after the AND function. The OR function will return a true value if the cell being
evaluated passes any of the logical tests that follow the OR function. Note that you can evaluate up to 255
different logical test after the AND and OR statements.
When you look at how you can combine these tests with the IF function, or many nested IF
functions, you can begin to see how you can start to become a very powerful formula creator. Now you can
run cells through a battery of tests, and then decide what function to perform or value to display based on
the results shown from the tests. The general syntax when combining the IF function with the AND and OR
functions is as follows:
Sa
=IF(AND(logical_test_1,logical_test_2,logical_test_3,etc.),true_response,false_response)
=IF(OR(logical_test_1,logical_test_2,logical_test_3,etc.),true_response,false_response)
TeachUcomp, Inc.
Advanced Excel
ACTIONSTable-Related Functions
GENERAL SYNTAX FOR THE HLOOKUP AND VLOOKUP FUNCTIONS:
on
ly
.
1. =VLOOKUP(lookup_value,table_array,column_index_number,range_lookup)
2. =HLOOKUP(lookup_value,table_array,row_index_number,range_lookup)
GENERAL SYNTAX FOR THE IF FUNCTION:
1. =IF(logical_test,true_response,false_response)
at
io
1. =IF(logical_test _1,true_response,IF(logical_test_2,true_response,false_response))
lu
1. =IF(AND(logical_test_1,logical_test_2,logical_test_3,etc.),true_response,false_response)
Sa
pl
e-
fo
re
va
2. =IF(OR(logical_test_1,logical_test_2,logical_test_3,etc.),true_response,false_response)
TeachUcomp, Inc.
Advanced Excel
EXERCISESTable-Related Functions
Purpose:
on
ly
.
io
at
lu
va
Sa
pl
e-
fo
13.
14.
15.
16.
re
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
TeachUcomp, Inc.
Advanced Excel