MICROSOFT OFFICE APPLICATIONS

Similar documents
Excel 2. Module 2 Formulas & Functions

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

ADVANCED EXCEL: LOOKUP FUNCTIONS

IF & VLOOKUP Function

Microsoft Excel 2010 Handout

Microsoft Excel Lookup Functions - Reference Guide

NUMERICAL COMPUTING For Finance Using Excel. Interpolation

Excel Tips for Compensation Practitioners Weeks 9-12 Working with Lookup Formulae

Agenda. Spreadsheet Applications. Spreadsheet Terminology A workbook consists of multiple worksheets. By default, a workbook has 3 worksheets.

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited EXCEL ADVANCED

Advanced Formulas and Functions in Microsoft Excel

Microsoft Office Excel 2007: Advanced Unit 02 - Lookups and Data Tables

Excel Lesson 3 USING FORMULAS & FUNCTIONS

Microsoft Excel 2007

MODULE VI: MORE FUNCTIONS

Formulas and Functions

How to use the Vlookup function in Excel

Excel Expert Microsoft Excel 2010

VLOOKUP() takes three mandatory parameters and one default/optional parameter:

Using Microsoft Excel

Getting Started with Excel

Intermediate Excel Training Course Content

Commonly Used Excel Formulas

THE FORMULAS TAB, CELL REFERENCING,THE VIEW TAB & WORKBOOK SECURITY THE FORMULAS TAB, CELL REFERENCING, THE VIEW TAB & WORKBOOK SECURITY OBJECTIVES

What is a spreadsheet?

Excel VLOOKUP. An EMIS Coordinator s Friend

SUM - This says to add together cells F28 through F35. Notice that it will show your result is

Using Excel for a Gradebook: Advanced Gradebook Formulas

Lecture-14 Lookup Functions

1. NORM.INV function Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.

New Perspectives on Microsoft Excel Module 3: Performing Calculations with formulas and Functions

Using Formulas and Functions

Excel: Linking sheets and summary sheets (Mac OS)

MICROSOFT EXCEL 2000 LEVEL 3

CMPF124 Microsoft Excel Tutorial

Pivot Table Project. Objectives. By the end of this lesson, you will be able to:

ICT IGCSE Practical Revision Presentation Spreadsheets. Columns. Rows. This is a range of cells. More than one cell has been selected.

Microsoft Excel 2010

Using Advanced Formulas and 9 Securing Workbooks

What is a VLOOKUP? Source

COMPUTER TECHNOLOGY SPREADSHEETS BASIC TERMINOLOGY. A workbook is the file Excel creates to store your data.

Department of Language and Linguistics LG400. Computer Induction for Linguists. Class Handouts. Week 7. Working with data on MS Excel.

Key concepts through Excel Basic videos 01 to 25

DESCRIPTION 1 TO DEFINE A NAME 2. USING RANGE NAMES 2 Functions 4 THE IF FUNCTION 4 THE VLOOKUP FUNCTION 5 THE HLOOKUP FUNCTION 6

Excel Flash Fill. Excel Flash Fill Example

WEEK NO. 12 MICROSOFT EXCEL 2007

Introduction to Excel 2013

Advanced Excel. Click Computer if required, then click Browse.

EXCEL BASICS: MICROSOFT OFFICE 2010

Basic Excel 2010 Workshop 101

exam. Number: Passing Score: 800 Time Limit: 120 min MICROSOFT Excel 2013 Expert Part One.

Using Advanced Formulas

EXCEL BASICS: MICROSOFT OFFICE 2007

EXCEL TUTORIAL.

Activity: page 1/10 Introduction to Excel. Getting Started

Vlookup and Sumif Formulas to assist summarizing queried data

Skill Set 5. Outlines and Complex Functions

INTRODUCTION... 1 UNDERSTANDING CELLS... 2 CELL CONTENT... 4

Excel Formulas and Functions

Extracting the last word of a string Extracting all but the first word of a string Extracting first names, middle names, and last names Counting the

Microsoft Excel Microsoft Excel

Introduction to Microsoft Excel

MICROSOFT EXCEL VERSIONS 2007 & 2010 LEVEL 3. WWP Learning and Development Ltd Page 1

Customer details are included on a separate worksheet (Customer Look Up) Item details are included on a separate worksheet (Item Look Up)

VLOOKUP Function Purpose (Mac Guide)

FSFOA EXCEL INSTRUCTIONS. Tips and Shortcuts

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

Excel 2016 Basics for Windows

Workbook Also called a spreadsheet, the Workbook is a unique file created by Excel. Title bar

1 THE PNP BASIC COMPUTER ESSENTIALS e-learning (MS Excel 2007)

Excel Level 1

MICROSOFT OFFICE. Courseware: Exam: Sample Only EXCEL 2016 CORE. Certification Guide

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators:

Application of Skills: Microsoft Excel 2013 Tutorial

1.a) Go to it should be accessible in all browsers

Excel Intermediate. Click in the name column of our Range of Data. (Do not highlight the column) Click on the Data Tab in the Ribbon

Contents. 1. Managing Seed Plan Spreadsheet

SPREADSHEET (Excel 2007)

This book is about using Microsoft Excel to

MICROSOFT EXCEL 2003 LEVEL 3

Downloading other workbooks All our workbooks can be downloaded from:

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010

My Top 5 Formulas OutofhoursAdmin

Introduction to Excel 2007 Table of Contents

Microsoft Excel 2010 Basics

Excel 101. DJ Wetzel Director of Financial Aid Greenville Technical College

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

Excel 2016: Formulas & Functions

EXCEL 2003 DISCLAIMER:

Microsoft Excel 2010 Training. Excel 2010 Basics

The Excel worksheet contains 16,384 rows that extend down the worksheet, numbered 1 through

Understanding error messages

MICROSOFT EXCEL 2002 (XP): LEVEL 3

Prepared by: Prof. Dr Bahaman Abu Samah Department of Professional Development and Continuing Education Faculty of Educational Studies Universiti

Excel Format cells Number Percentage (.20 not 20) Special (Zip, Phone) Font

Excel Lesson 1 Microsoft Excel Basics

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited

Advanced formula construction

Microsoft Excel 2007 Beginning The information below is devoted to Microsoft Excel and the basics of the program.

Unit 12. Electronic Spreadsheets - Microsoft Excel. Desired Outcomes

Transcription:

MICROSOFT OFFICE APPLICATIONS EXCEL 2016 : LOOKUP, VLOOKUP and HLOOKUP Instructor: Terry Nolan terry.nolan@outlook.com Friday, April 6, 2018 1

LOOKUP FUNCTIONS WHAT ARE LOOKUP FUNCTIONS USUALLY USED FOR? THREE DIFFERENT LOOKUP FUNCTIONS LOOKUP, VLOOKUP and HLOOKUP WHICH FUNCTION SHOULD YOU USE? LOOKUP Function (when to use it) VLOOKUP Function (when to use it) HLOOKUP Function (when to use it) LOOKUP Function The LOOKUP function is available in two different forms: VECTOR FORM or ARRAY FORM VECTOR: a portion of ONE SINGLE ROW or a portion of ONE SINGLE COLUMN of data. ARRAY: a portion of MULTIPLE ROWS and/or MULTIPLE COLUMNS. VECTOR FORM of the LOOKUP Function: VECTOR FORM SYNTAX VECTOR FORM EXAMPLE 1: Search within a single-column range of cells VECTOR FORM EXAMPLE 2: Search within a single-row range of cells ARRAY FORM of the LOOKUP Function: ARRAY FORM SYNTAX ARRARY FORM EXAMPLE: Search within an array of cells ADDITIONAL FACTS TO KNOW ABOUT THE LOOKUP FUNCTION VLOOKUP Function VLOOKUP SYNTAX VLOOKUP EXAMPLE: Assign the appropriate Letter-grade HLOOKUP Function HLOOKUP SYNTAX HLOOKUP EXAMPLE: Find the appropriate Diameter and Orbit Period ADDITIONAL FACTS TO KNOW ABOUT THE VLOOKUP AND HLOOKUP FUNCTIONS Friday, April 6, 2018 2

ADDITIONAL INFORMATION: ERROR CODES / MESSAGE CODES QUICK REVIEW: EXCEL FORMULAS versus FUNCTIONS RELATIVE versus ABSOLUTE CELL REFERENCE TERMINOLOGY LOOKUP FUNCTION EXAMPLE IMAGES EXAMPLE 1 VECTOR FORM COLUMN RANGE EXAMPLE: Search within a single-column range of cells EXAMPLE 2 VECTOR FORM ROW RANGE EXAMPLE: Search within a single-row range of cells EXAMPLE 3 ARRARY FORM BLOCK RANGE EXAMPLE: Search within an array of cells EXAMPLE 4 VLOOKUP CLASS EXAMPLE: Assign the appropriate Letter-grade EXAMPLE 5 HLOOKUP CLASS EXAMPLE: Find the appropriate Diameter and Orbit Period Friday, April 6, 2018 3

LOOKUP FUNCTIONS WHAT ARE LOOKUP FUNCTIONS USUALLY USED FOR? As the name indicates; an Excel LookUp function may be used to LOOK UP or FIND a specific label or value within a designated range of cells on an Excel worksheet. After the LookUp function successfully finds the item it was looking for, it will EXTRACT and RETURN a different label or value one which is related to the original label or value found in the designated range of cells. THREE DIFFERENT LOOKUP FUNCTIONS The current version of the Excel program includes three different LookUp functions: 1. LOOKUP 2. VLOOKUP (V for Vertical) 3. HLOOKUP (H for Horizontal) Friday, April 6, 2018 4

WHICH FUNCTION SHOULD YOU USE? The overall arrangement of the data within a specified range of cells is what will help to determine which of the three LookUp functions will be the appropriate function to use when working with a collection of data. 1. LOOKUP FUNCTION (when to use it) Use the LOOKUP function to: Search for a specified label/value within a range of cells in any specified single row or single column, and then Extract and Return the corresponding label/value in the same position within a different row or column. So the LOOKUP function can be used to search either horizontally or vertically within a range of data. IN THIS EXAMPLE: 1. Excel Searched within the Part Number column to find the label C0004, 2. Jumped to the Part Price column within the same row, and then 3. Extracted the value 169.99 from the specified cell in that row. Friday, April 6, 2018 5

2. VLOOKUP FUNCTION (when to use it) Use the VLOOKUP function to: search within a range of data which is set up vertically organized by columns. The VLOOKUP function: Searches for a specified label/value in the leftmost column of a range of data, and then Extracts and Returns the label/value in the same row but within a different column which you specify in the range of data. IN THIS EXAMPLE: 1. Each Student has an Average Score calculated and displayed within the column labeled Average 2. Note the Average Score of 80.50 for Steve 3. The LOOKUP function tells Excel to search within the leftmost column of the Letter Grades table for that Average Score of 80.50 4. Because Excel will not be able to find an exact match of 80.50 in the column, it will select an approximate match. 5. The approximate match that will be selected from the table must be the value closest to, but still less than, the actual Average Score of 80.50 6. So 80 will be the value selected within the left-column of the table, and as a result, the letter-grade of B, which is within the same row one column to the right, will be assigned. Friday, April 6, 2018 6

3. HLOOKUP FUNCTION (when to use it) Use the HLOOKUP function to: search within a range of data which is set up horizontally organized by rows. The HLOOKUP function: Searches for a specified label/value in the top row of a range of data, and then Extracts and Returns the label/value in the same column but within a different row which you specify in the range of data. IN THIS EXAMPLE: 1. There are actually two different HLOOKUP functions entered on this sample worksheet one in CELL B8 (for the Diameter) and the other in CELL B9 (for the Orbit Period). 2. The HLOOKUP function which was entered in CELL B8 searches within the top row of the defined range of cells for the Planet named Saturn 3. After it finds Saturn within a cell in the top row of the table in COLUMN G, 4. Excel will move down one row in the same column, to CELL G3, and extract the Diameter of 116464 5. A similar HLOOKUP function was entered in CELL B9, which again searches within the top row of the defined range of cells for the Planet named Saturn 6. After it finds Saturn within a cell in the top row of the table in COLUMN G, 7. Excel will move down two rows in the same column, to CELL G4, and extract the Orbit Period of 10756. Friday, April 6, 2018 7

SUMMARY WHICH FUNCTION TO USE So one of the main distinctions between the original LOOKUP function, the VLOOKUP function and the HLOOKUP function is that: The original LOOKUP function may be used to search within ANY SPECIFIED ROW or ANY SPECIFIED COLUMN on a worksheet to find an item. The VLOOKUP function is intended to search only within the LEFTMOST COLUMN of a specified range of data (e.g. table_array) to find an item. The HLOOKUP function is intended to search only within the TOP ROW of a specified range of data (e.g. table_array) to find an item. The overall layout of the data is what will usually be used to determine which of the three LookUp functions will be appropriate for use when searching within a specified range of data. Friday, April 6, 2018 8

LOOKUP Function The LOOKUP function is available in two different forms: VECTOR FORM and ARRAY FORM A VECTOR (or range) of cells is a portion of one single row or one single column An ARRAY of cells is a block of multiple rows and/or multiple columns So the LOOKUP function may be used to return a value from within either: A VECTOR: A portion of data in ONE SINGLE COLUMN Vector Vector A portion of data in ONE SINGLE ROW vector vector AN ARRAY: A block of data within MULTIPLE ROWS and/or MULTIPLE COLUMNS. Search Array SUMMARY: So the standard LOOKUP function may be used in either: VECTOR Form (Single Column or Single Row of cells), or ARRAY Form (Table of cells Both Rows and Columns) Friday, April 6, 2018 9

VECTOR FORM of the LOOKUP Function: So you may use the VECTOR FORM of the LOOKUP function to: Search for a specified label/value* within a range of cells, known as the lookup_vector, and then Extract and Return the corresponding label/value in the same position within a different range of cells, known as the result_vector. *The LOOKUP function always performs an approximate match VECTOR FORM COLUMN RANGE EXAMPLE lookup_vector result_vector VECTOR FORM ROW RANGE EXAMPLE lookup_vector result_vector VECTOR FORM SYNTAX: =LOOKUP(lookup_value, lookup_vector, [result_vector]) lookup_value Required. A label/value that the LOOKUP function searches for within the lookup_vector. lookup_vector Required. The range of cells the LOOKUP function searches within to find the lookup_value. result_vector Optional. If indicated, the range of cells from which the LOOKUP function extracts a label/value. Friday, April 6, 2018 10

VECTOR FORM COLUMN RANGE EXAMPLE: Search within a single-column range of cells Display the appropriate worksheet: Click on the LOOKUP - VECTOR - SINGLE COLUMN tab The LOOKUP VECTOR SINGLE COLUMN worksheet will appear RESULT AREA DATA AREA DATA AREA: The Seller/Product Data Area consists of TWO COLUMNS side-by-side: lookup_vector: The entries in the left-column, (COLUMN D), represent the name of the Seller, while result_vector: The entries in the right-column, (COLUMN E), represent the name of the associated Product. RESULT AREA: lookup_vector result_vector The area along the left edge of the worksheet, in a section labeled Result. Seller: This is the cell where the name of the Seller to be found within the lookup_vector (COLUMN D) will be manually entered. Product: This is the cell in which the LOOKUP function will be entered. The result which will appear should be the associated entry pulled from within the result_vector (COLUMN E). Friday, April 6, 2018 11

Enter the LOOKUP function in CELL B5 Click within CELL B5 Type =LOOKUP(B4,D4:D7,E4:E7) in the Formula Bar and Press ENTER The #N/A message should appear in CELL B5 The #N/A message indicates that the LOOKUP function is CURRENTLY unable to find an associated entry from within the designated range of cells in COLUMN E (the result_vector). In this instance since CELL B4 is BLANK, the blank entry is basically out-ofrange, so the LOOKUP function cannot associate any entry from within the result_vector. Friday, April 6, 2018 12

Enter the lookup_value in CELL B4 Click within CELL B4 Type Sally in the Formula Bar and Press ENTER The #N/A message within CELL B5 will be replaced with the name of the Product (Oranges) which is sold by the Seller who was entered in CELL B4 (Sally). BEFORE AFTER Friday, April 6, 2018 13

VECTOR FORM ROW RANGE EXAMPLE: Search within a single-row range of cells Display the appropriate worksheet: Click on the LOOKUP - VECTOR - SINGLE ROW tab The LOOKUP VECTOR SINGLE ROW worksheet will appear RESULT AREA DATA AREA DATA AREA: The Seller/Product Data Area consists of TWO ROWS: lookup_vector: The entries in the upper-row, (ROW 3), represent the name of the Seller, result_vector: The entries in the lower-row, (ROW 4), represent the name of the associated Product. lookup_vector result_vector RESULT AREA: The area along the left edge of the worksheet, in a section labeled Result. Seller: This is the cell where the name of the Seller to be found in the lookup_vector (ROW 3) will be entered. Product: This is the cell in which the LOOKUP function will be entered. The result which will appear should be the appropriate entry pulled from the result_vector (ROW 4). Friday, April 6, 2018 14

Enter the LOOKUP function in CELL B5 Click within CELL B5 Type =LOOKUP(B4,E3:H3,E4:H4) in the Formula Bar and Press ENTER The #N/A message should appear in CELL B5 The #N/A message indicates that the LOOKUP function is CURRENTLY unable to find an associated entry from within the designated range of cells in ROW 4 (the result_vector). In this instance since CELL B4 is BLANK, the blank entry is basically out-ofrange, so the LOOKUP function cannot associate any entry from within the result_vector. Friday, April 6, 2018 15

Enter the lookup_value in CELL B4 Click within CELL B4 Type Robert in the Formula Bar and Press ENTER The #N/A message within CELL B5 will be replaced with the name of the Product (Apricots) which is sold by the Seller who was entered in CELL B4 (Robert). BEFORE AFTER Friday, April 6, 2018 16

QUICK REVIEW: VECTOR FORM OF THE LOOKUP FUNCTION EXAMPLE SUMMARY In BOTH Vector Form examples, the LOOKUP function operated very much the same. The only distinction between the two examples, was the overall shape (or layout) of the region of data within the table varied (lookup_vector and result_vector). lookup_vector VECTOR FORM COLUMN RANGE EXAMPLE result_vector lookup_vector result_vector VECTOR FORM ROW RANGE EXAMPLE Friday, April 6, 2018 17

ARRAY FORM of the LOOKUP Function: While working within Excel, the term Array represents a collection of data (labels/values) located within multiple rows and multiple columns similar to a table. So you may use the ARRAY FORM of the LOOKUP function to: Search for a specified label/value* within the FIRST ROW or COLUMN of a specified range of cells (array or table), and then Extract and Return the corresponding label/value from the same position within the LAST ROW or COLUMN of the specified range of cells. *The LOOKUP function always performs an approximate match Search Array First Column Last Column Example: If the LOOKUP function searches for the Customer Number 3 in the first column of the table, It will then extract the State of CA from the last column of the table IMPORTANT: Approximate Match When using any form of the LOOKUP function, the LOOKUP function will locate and return an approximate match if an exact match cannot be found. ARRAY FORM SYNTAX: =LOOKUP(lookup_value, array) lookup_value Required. A label/value that the LOOKUP function searches for within the specified array of cells. array Required. The range of cells the LOOKUP function searches within to find the lookup_value. Friday, April 6, 2018 18

ARRAY FORM BLOCK RANGE EXAMPLE: Search within an array of cells Display the appropriate worksheet: Click on the LOOKUP ARRAY FORM tab The LOOKUP ARRAY FORM worksheet will appear DATA AREA RESULT AREA DATA AREA: The Customers Table is the array of data which will be searched. It includes a block of cells consisting of Four Columns and Four Rows of cells. Search Array: The range of cells CELL A4 through CELL D7. RESULT AREA: The area along the right edge of the occupied cells within the worksheet, in a section labeled Result. Customer #: This is the cell where the Customer # to be found in the left-most column of the array (COLUMN A) will be entered. State: This is the cell in which the LOOKUP function will be entered. The result which will appear should be the appropriate entry pulled from the right-most column (COLUMN D) in the array of cells CELLS A4:D7. Friday, April 6, 2018 19

Enter the LOOKUP function in CELL G5 Click within CELL G5 Type =LOOKUP(G4,A4:D7) in the Formula Bar and Press ENTER The #N/A message should appear in CELL G5 The #N/A message indicates that the LOOKUP function is CURRENTLY unable to find an associated entry from within the designated range of cells in COLUMN D (the result_vector). In this instance since CELL B4 is BLANK, the blank entry is basically out-ofrange, so the LOOKUP function cannot associate any entry from within the Last Column of the array of cells. Friday, April 6, 2018 20

Enter the lookup_value in CELL G4 Click within CELL G4 Type 4 in the Formula Bar and Press ENTER The associated entry (FL) listed within COLUMN D (the right-most column in the array of cells) will be extracted and automatically inserted in CELL G5. BEFORE AFTER Friday, April 6, 2018 21

SUMMARY: THREE DIFFERENT FORMS OF THE LOOKUP FUNCTION VECTOR FORM COLUMN RANGE EXAMPLE: Search within a single-column range of cells VECTOR FORM ROW RANGE EXAMPLE: Search within a single-row range of cells ARRAY FORM BLOCK RANGE EXAMPLE: Search within an array of cells Friday, April 6, 2018 22

ADDITIONAL FACTS TO KNOW ABOUT THE EXCEL LOOKUP FUNCTION: VECTOR FORM: =LOOKUP(lookup_value, lookup_vector, [result_vector]) ARRAY FORM: =LOOKUP(lookup_value, array) The lookup_value can be a number, text, logical value (of TRUE or FALSE), a specific cell reference (e.g. A1) or the name which has been assigned to the cell (e.g. Grades) which contains the actual lookup_value. The LOOKUP function IS NOT case-sensitive; therefore, it will not differentiate between upper-case and lower-case characters. This means, it treats MARY, Mary and mary the same. The LOOKUP function does not support wildcard characters (e.g. * and?) in the lookup_value argument. If you wish to use wildcard characters, it is recommended you use either the VLOOKUP or HLOOKUP function. IMPORTANT: The data in the lookup_vector must appear in ascending order (from smallest to largest or A to Z). If the data is not in ascending order, the LOOKUP function will likely return an error or the wrong result. The lookup_vector must consist of a specified range of cells located within a portion of one individual row or one individual column. The result_vector must consist of a specified range of cells located within a portion of one individual row or one individual column. The result_vector argument must be the same size as lookup_vector. The LOOKUP function always works based upon an approximate match. o o o The LOOKUP function will FIRST try to find an exact match. If the LOOKUP function cannot find an exact match, it will use the value within the table which is closest to but still less than the value which is being searched for. Another way to describe the value it will select would be the largest value in the lookup_vector that is less than or equal to the lookup_value. If the lookup_value is smaller than the smallest value in the lookup_vector, the LOOKUP function will return the #N/A message, indicating that the result is Not Available. The data within the lookup_vector may consist of text, numbers, or logical values. If a result_vector is not specified, the result to be returned from the LOOKUP function will be pulled from within the lookup_vector. If the array has more rows than columns or the same number of rows and columns, the LOOKUP function searches in the first column (horizontal lookup). If the array has more columns than rows, the LOOKUP function searches in the first row (vertical lookup) Friday, April 6, 2018 23

VLOOKUP Function Use the VLOOKUP function to search vertically within a range of data Usually organized by columns. The VLOOKUP function: Searches for a specified label/value in the leftmost column of a range of data, and then Extracts and Returns the label/value in the same row but within a different column which you specify in the range of data. VLOOKUP is often used when the comparison labels/values are located in a single column to the left of the actual data to be found. VLOOKUP SYNTAX: =VLOOKUP(lookup_value, table_array, column_index_num, [range_lookup]) lookup_value Required. The label/value to be found within the first column of the table_array. table_array Required. The entire range of cells in which the lookup_value is to be found. column_index_num Required. The column number within the table_array from which the label/value is to be extracted. range_lookup Optional. range_lookup value may be used to determine the matching mode Two matching modes are available: approximate match or exact match 1 or TRUE: approximate match (default) 0 or FALSE: exact match Friday, April 6, 2018 24

VLOOKUP CLASS EXAMPLE: Assign the appropriate letter-grade Display the appropriate worksheet: Click on the VLOOKUP EXAMPLES GRADES tab The VLOOKUP EXAMPLES GRADES worksheet will appear GOAL: Based on the Average Score calculated for each student (COLUMN H), locate and assign the appropriate Letter Grade (COLUMN I) which corresponds to the calculated score. METHOD: Use the VLOOKUP function to: (1) Locate an approximate match for each student s calculated Average Score within the range of cells defined as the Letter Grades LOOKUP TABLE, and then (2) Extract and Display the associated letter grade. Friday, April 6, 2018 25

STUDENTS INFORMATION: Student Name (COLUMN A) Scores (COLUMN B through COLUMN G): Listing of each student s scores for four Homework Assignments, one Midterm and one Final (HW1, HW2, Midterm, HW3, HW4 and Final) Average (COLUMN H): Student s Average score calculated via the AVERAGE function. Grade (COLUMN I): The Letter Grade for each student s Average Score is then determined via the VLOOKUP function. Friday, April 6, 2018 26

Enter the VLOOKUP function in CELL I3 Click within CELL I3 Type =VLOOKUP(H3,Grades,2) in the Formula Bar and Press ENTER The #NAME? message should appear in CELL I3 The basic purpose of the #NAME? message is to signify that something needs to be corrected in the syntax of the command entered within that cell. Range Name does not yet exist In this example, the #NAME? message is appearing because there is a reference to a non-existent named range of cells - Grades within the VLOOKUP command. Follow the instructions on the next page to define the appropriate range of cells representing the Letter Grades table and apply the Range Name of Grades. Approximate Match In this example, we intentionally omitted the fourth parameter of the VLOOKUP command (range_lookup). By doing this we went along with the default setting of that parameter (TRUE) which will make it an approximate match VLOOKUP procedure. Friday, April 6, 2018 27

Assign the Range Name of Grades to the range of CELLS J19 through CELLS K23 Highlight the range of cells containing the Numeric Scores and the associated Letter Grades (CELLS J19 through CELLS K23) Click on the FORMULAS tab to display the FORMULAS ribbon Within the Defined Names group, click on the Name Manager button The Name Manager dialog box will appear Click on the New button in the top-left corner of the dialog box The New Name dialog box will appear Recognize the default name already entered in the Name: box Friday, April 6, 2018 28

Click within the Name: box and Delete the default name Type Grades in the Name: box and Click on the OK button The Name Manager dialog box will return IMPORTANT: Note the NEW Range Name definition should now appear Click on the Close button (to close the Name Manager dialog box) Note an appropriate letter-grade now appears within CELL I3 BEFORE AFTER Friday, April 6, 2018 29

Use the Auto-Fill procedure to quickly copy the VLOOKUP function entered in CELL I3 Click within CELL I3, and then Position the mouse pointer directly over the auto-fill handle along the bottom-right corner of the cell border. The mouse pointer will change shape BEFORE AFTER Press and hold down the left mouse button and Drag the mouse pointer down to CELL I14 Release the left mouse button after the range of CELLS I3 through I14 are outlined. The VLOOKUP function that was entered in CELL I3 will be copied downward to each cell through CELL I14 Each cell in the target cell range should now contain an appropriate Letter Grade. BEFORE AFTER Friday, April 6, 2018 30

Review the result copied to several of the Target Cells via the Auto-Fill procedure Click on each cell within the target cell range to select and review the revised cell address within the VLOOKUP function shown in the Formula Bar after it had been pasted in to each cell. Recognize that the Relative Cell Reference to the ROW NUMBER within the function was increased by one each time the VLOOKUP function was copied and pasted down one row within the same column. CELL I3 CELL I4 CELL I5 CELL I6 Friday, April 6, 2018 31

HLOOKUP Function Use the HLOOKUP function to search horizontally within a range of data Usually organized by rows. The HLOOKUP function: Searches for a specified label/value in the top row of a range of data, and then Extracts and Returns the label/value in the same column but within a different row which you specify in the range of data. HLOOKUP is often used when the comparison labels/values are located in a single row above the actual data to be found. HLOOKUP SYNTAX: =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) lookup_value Required. The label/value to be found within the first row of the table_array. table_array Required. The entire range of cells in which the lookup_value is to be found. row_index_num Required. The row number within the table_array from which the label/value is to be extracted. range_lookup Optional. range_lookup value may be used to determine the matching mode Two matching modes are available: exact match or approximate match 1 or TRUE: approximate match (default) 0 or FALSE: exact match Friday, April 6, 2018 32

HLOOKUP CLASS EXAMPLE: Find the appropriate Diameter and Orbit Period Display the appropriate worksheet: Click on the HLOOKUP EXAMPLE - PLANETS tab The HLOOKUP EXAMPLE PLANETS worksheet will appear DATA AREA RESULT AREA DATA AREA: Table of planet information Planet Name (1 ST ROW) Diameter (km) (2 ND ROW) Size of the planet specified Orbit Period (days) (3 RD ROW) Number of days required for the planet to orbit around the sun RESULT AREA: Based on the Planet Name specified (CELL B7), locate, extract and display the selected planet s: Diameter (CELL B8), and Orbit Period (CELL B9). Friday, April 6, 2018 33

METHOD: Use the HLOOKUP function to: (1) Locate an exact match for the Planet Name specified within the top row of the defined range of data, and then (2) Extract and Display the associated Diameter and Orbit Period of the specified planet from two remaining rows of the defined range of data. HOW TO PERFORM AN EXACT MATCH? In this example, FALSE will be included as the fourth parameter (range_lookup) of the HLOOKUP command. By manually setting this parameter to FALSE: The default setting of the range_lookup parameter (TRUE) will be overridden. As a result, only an EXACT MATCH will be accepted. If the HLOOKUP function cannot find an EXACT MATCH, the #N/A message will appear as the result. WHY SHOULD AN EXACT MATCH BE PERFORMED? An exact match setting is required in this example because the Planets listed in ROW 2, ARE NOT listed from left-to-right in alphabetical order. Friday, April 6, 2018 34

Enter the HLOOKUP function in CELL B8 Click within CELL B8 Type =HLOOKUP(B7,B2:I4,2,FALSE) in the Formula Bar and Press ENTER The #N/A message should appear in CELL B8 The basic purpose of the #N/A message is to signify that a requested value is not available to the formula or function that has been entered. In this example, the HLOOKUP function is referencing CELL B7, which at this time is blank. In a few moments, you will be prompted to enter a valid Planet Name in CELL B7; after that, the #N/A message will be replaced with the content of the referenced cell. Friday, April 6, 2018 35

Enter another HLOOKUP function in CELL B9 Click within CELL B9 Type =HLOOKUP(B7,B2:I4,3,FALSE) in the Formula Bar and Press ENTER The #N/A message should appear in CELL B9 The basic purpose of the #N/A message is to signify that a requested value is not available to the formula or function that has been entered. In this example, the HLOOKUP function entered in CELL B9 is referencing CELL B7 which at this time is blank. In a few moments, you will be prompted to enter a valid planet name in CELL B7; after that, the #N/A message will be replaced with the content of the referenced cell. Friday, April 6, 2018 36

Enter the Planet Name (Saturn) in CELL B7 Click within CELL B7 Type Saturn in the Formula Bar and Press ENTER The #N/A messages within both CELL B8 and CELL B9 will be replaced with the appropriate numeric values pulled from the table representing the Diameter and Orbit Period of the Planet entered in CELL B7. BEFORE AFTER Friday, April 6, 2018 37

ADDITIONAL FACTS ABOUT THE VLOOKUP AND HLOOKUP FUNCTIONS: =VLOOKUP(lookup_value, table_array, column_index_num, [range_lookup]) =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) The lookup_value can be a number, text, logical value (of TRUE or FALSE), a specific cell reference (e.g. A1) or the name which has been assigned to the cell (e.g. Grades) which contains the actual lookup value. Both the VLOOKUP and HLOOKUP functions ARE NOT case-sensitive; therefore, they will not differentiate between upper-case and lower-case characters. This means, it treats MARY, Mary and mary the same. Both the VLOOKUP and HLOOKUP functions support wildcard characters (e.g. * and?) in the lookup_value argument (only when the lookup_value is text AND the range_lookup is set to FALSE). o Anytime you want the asterisk (*) or question mark (?) symbols not to act as a wildcard within a string of text, add the tilde (~) character just before that character in the string. The table_array is often referred to as the lookup_table. While using the VLOOKUP function: o the table_array must contain at least two columns of data. o the columns within the table_array will be numbered from left-to-right, starting with the value 1. o the column_index_number represents the number assigned to the column within the table_array from which the lookup_value is to be extracted. o if the column_index_num is less than 1, VLOOKUP will return the #VALUE! error message. o if the column_index_num is greater than the number of columns within the defined table_array, VLOOKUP will return the #REF! error message. While using the HLOOKUP function: o the table_array must contain at least two rows of data. o the rows within the table_array will be numbered from top-to-bottom, starting with the value 1. o the row_index_number represents the number assigned to the row within the table_array from which the lookup_value is to be extracted. o if the row_index_num is less than 1, HLOOKUP will return the #VALUE! error message. o if the row_index_num is greater than the number of rows within the defined table_array, HLOOKUP will return the #REF! error message. While using either the VLOOKUP or HLOOKUP functions, the range_lookup parameter is optional. o The range_lookup parameter may be used to determine the MATCHINE MODE. o Two different matching modes are available: EXACT Match or APPROXIMATE Match o If the range_lookup parameter is set to TRUE (or 1), an APPROXIMATE Match will be performed. Friday, April 6, 2018 38

o If the range_lookup parameter is set to FALSE (or 0), an EXACT Match will be performed. o The range_lookup parameter of TRUE (or 1) is the default. o If the range_lookup parameter is OMITTED, then VLOOKUP or HLOOKUP takes on the default value of TRUE (or 1) and an APPROXIMATE match will be performed. o If the range_lookup parameter is set to FALSE (or 0) AND Excel is unable to find an exact match, the result displayed within the cell will be the familiar #N/A error. When the range_lookup parameter is TRUE (or 1): o Both the VLOOKUP and HLOOKUP function will FIRST try to find an exact match. o If the VLOOKUP or HLOOKUP function cannot find an exact match, it will use the value within the table which is closest to, but still less than the value which is being searched for. o Finally, if the VLOOKUP or HLOOKUP function cannot find an exact match AND there is no next lower value available, the result will be the familiar #N/A error. While using the VLOOKUP or HLOOKUP functions, if any columns or rows are inserted, moved or deleted from within the table_array range of cells, the column_index_num or row_index_num will not be updated automatically. While using the VLOOKUP function: o The left-most column in the table_array should always contain the lookup_value. o If the lookup_value IS NOT FOUND in the left column of the table_arrary, the VLOOKUP function will return the #N/A error value. o If the table_array argument includes empty columns along the left edge of the table_array, VLOOKUP returns the #N/A error value. While using the HLOOKUP function: o The top row in the table_array should always contain the lookup_value. o If the lookup_value IS NOT FOUND in the top row of the table_arrary, the HLOOKUP function will return the #N/A error value. o If the table_array argument includes empty rows along the top of the table_array, HLOOKUP returns the #N/A error value. Friday, April 6, 2018 39

ADDITIONAL INFORMATION: ERROR CODES / MESSAGE CODES When you enter a formula or function in a cell it is relatively simple to make a mistake. COMMON MESSAGE/ERROR CODES ####### Cell content too wide for the cell #DIV/0! A formula has attempted to divide a number by Zero or an Empty Cell #N/A! Excel cannot find the label/value that is referenced #NAME? Excel does not recognize text in a formula #NUM! A formula or function contains invalid numeric values #NULL! There is no value in the designated area (cell reference). #REF! Indicates an invalid cell reference. Common in copied formulas/functions. #VALUE! A value used in a formula or function is the wrong data type. QUICK REVIEW: EXCEL FORMULAS versus FUNCTIONS While working with Excel there are two primary ways to calculate or find an answer within a cell: A FORMULA is a mathematical expression which may be used to manually calculate a value within a cell. A FUNCTION is a pre-defined formula, already available for use within Excel. Each Function is designed to perform specific calculations, in a particular order, based on the values specified. These values are usually referred to as arguments or parameters, and should be enclosed within a set of parenthesis. Friday, April 6, 2018 40

RELATIVE, ABSOLUTE and MIXED CELL REFERENCES There are multiple types of cell references: RELATIVE, ABSOLUTE. and MIXED. RELATIVE Cell Reference ABSOLUTE Cell References MIXED Cell References An Absolute Cell Reference is designated by the addition of a dollar sign ($) placed before BOTH the column reference AND the row reference. If there has been no dollar sign added before the column and row being referenced, it is known as a Relative Cell Reference. If a dollar sign is placed before only the column OR row reference, it is known as a Mixed Cell Reference. One of the most notable distinctions between a Relative Cell Reference and an Absolute Cell Reference is what will happen when the cell reference is copied from one cell to another cell. When an Absolute Cell Reference is copied from one cell to another, there will be no change to the cell reference. The copy of the Absolute Cell Reference which is pasted in to the target cell will be exactly the same as the original Absolute Cell Reference. When a Relative Cell Reference is copied from one cell to another, the result pasted within the target cell may be different than the cell reference inside the original cell. The most likely difference will be the row and/or column referenced within the original cell will have been changed. The change will reflect the number of rows and/or columns between the original cell and the target cell. FYI: While entering or editing any cell reference in the Formula Bar, you may press the F4 KEY on the keyboard to automatically switch between each of the four different Cell Reference types shown above. Friday, April 6, 2018 41

COPYING RELATIVE AND ABSOLUTE CELL REFERENCES: RELATIVE and ABSOLUTE cell references will behave differently when copied to other cells Relative Cell References may change automatically when copied to a different cell. Absolute Cell References will remain constant no matter where they are copied. EXAMPLE 1: COPYING A FORMULA WHICH CONTAINS RELATIVE CELL REFERENCES Use the auto-fill procedure to copy a formula which contains RELATIVE CELL REFERENCES, from CELL A3 to CELLS B3, C3 and D3. BEFORE RESULT AFTER RESULT Because the formula in CELL A3 contains RELATIVE CELL REFERENCES, when the original formula (=A1+A2) was copied from CELL A3 to CELL B3, CELL C3 and CELL D3, the CHANGE IN COLUMNS will be applied to the cell references within the formula when pasted within each target cell. Original Formula within CELL A3: =A1+A2 Formula Pasted within CELL B3: =B1+B2 Formula Pasted within CELL C3: =C1+C2 Formula Pasted within CELL D3: =D1+D2 The columns referenced will change from A to B, C and D, but the row numbers will remain the same. As a result, the calculated values displayed in CELL B3, CELL C3 and CELL D3 will be different from the original calculated value in CELL A3. Friday, April 6, 2018 42

EXAMPLE 2: COPYING A FORMULA WHICH CONTAINS ABSOLUTE CELL REFERENCES Use the auto-fill procedure to copy a formula which contains ABSOLUTE CELL REFERENCES, from CELL C1 to CELLS C2, C3 and C4. BEFORE RESULT BEFORE RESULT Because the formula in CELL C1 contains ABSOLUTE CELL REFERENCES, when the original formula (=$A$1+$B$1) was copied from CELL C1 to CELL C2, CELL C3 and CELL C4, the CHANGE IN ROWS will not be applied to the cell references within the formula when pasted within each target cell. Original Formula within CELL C1: =$A1+$B$1 Formula Pasted within CELL C2: =$A1+$B$1 Formula Pasted within CELL C3: =$A1+$B$1 Formula Pasted within CELL C4: =$A1+$B$1 Both the row and column referenced within the formula in each cell will remain the same. As a result, the calculated values displayed in CELL C2, CELL C3 and CELL C4 will be the same as the original calculated value in CELL C1. Friday, April 6, 2018 43

TERMINOLOGY Absolute Cell Reference A cell reference which WILL NOT CHANGE when it is copied from one cell to another cell within a worksheet. You can use an Absolute Cell Reference to keep the row and/or column constant. Array (of Cells) A range of contiguous cells that contains text, numbers, or logical values that you want to compare with the lookup_value. Cell The intersection of a column and row in a table or in a spreadsheet. Cell Reference The intersection of a column and row designated by a column letter and a row number. For example, C5 is the address for the cell in the third column (COLUMN C) and the fifth row (ROW 5). column_index_num The column number within a table_array from which a label/value is to be extracted. Fill Handle A small black solid square in the bottom-right corner of a selected cell. It is used to duplicate formulas. Formula A mathematical expression which may be used to manually calculate a value within a cell. Formula Bar The area used to enter or edit cell contents. Function A pre-constructed formula that makes difficult computations less complicated. Group A collection of items within a table to be treated as a single item. HLOOKUP Function Searches throughout the cells within the top row of an array of cells for a specified label/value and returns the label/value in the same column within a different row. LOOKUP Function Searches throughout the cells within a specified column/row of a range of cells and returns the label/value in the same position in a different column/row of the data. Friday, April 6, 2018 44

lookup_value The label/value to be found within the appropriate column, row or array of cells. lookup_vector A range of cells that contains data within one row or column LookUp Table The table that Excel searches using a LookUp function. Name Box Displays the cell reference of the active cell. Portable Document Format (PDF) A universal file format that preserves a document s original data and formatting for multiplatform use. Range (of cells) A rectangular group of cells. A Range may be as small as a single cell or as large as the entire worksheet. Range Name Word or string of characters, to represent a cell, range of cells, or constant value. May be used within a formula or function instead of a cell reference. range_lookup value Usually used to determine the matching mode of an Excel VLOOKUP or HLOOKUP function FALSE: exact match TRUE: approximate match Relative Cell Reference A cell reference that changes relative to the direction in which the formula is being copied. result_vector A range of cells contained within only one row or one column. This argument should be the same size as the lookup_vector. Ribbon The Microsoft Office GUI command center that organizes commands into related Tabs, Groups and Buttons. Select All Button The square in the top-left corner of the row and column headings which may be used to select all elements of the worksheet. Friday, April 6, 2018 45

Sheet Tabs Sheet Tabs are located along the bottom-left edge of the Excel window and represent the sheets within a workbook that are currently open. Spreadsheet The computerized equivalent of a ledger that is a grid of rows and columns enabling users to organize data, recalculate formulas when any changes in data are made, and make decisions based on quantitative data. Status Bar The horizontal bar along the bottom of a Microsoft Office application window that displays summary information about the selected window or object and contains View buttons as well as the Zoom Slider. By default, the Excel Status Bar usually displays the average, count, or sum of values in a selected range of cells. SUM Function The function that adds or sums numeric entries within a range of cells and then displays the result in the cell containing the function. Tab Looks like a folder tab and divides the Ribbon into task-oriented categories. Table An area in a worksheet that contains rows and columns of similar or related information. A table can be used as part of a database or organized collection of related information, where the worksheet rows represent the records and the worksheet columns represent the fields in a record. The first row of a table often contains the column labels or field names. table_array The entire range of cells in which the lookup_value is to be found Text Any combination of entries from the keyboard which includes letters, numbers, symbols, and spaces. Title Bar The shaded bar along the top of every window; usually displays the Program Name and File Name. Value Number entered in a cell that represent a quantity, an amount, a date, or time. Variable A value that you can change, or vary, to see how those changes impact other values. Friday, April 6, 2018 46

VLOOKUP Function Searches throughout the cells within the first column of an array of cells for a specified label/value and returns the label/value in the same row within a different column. Workbook A collection of related worksheets contained within a single file. Worksheet A single spreadsheet consisting of columns and rows that may contain formulas, functions, values, text, and graphics. X (or Horizontal Axis) The axis that depicts categorical labels. Y (or Vertical Axis) The axis that depicts numerical values. Zoom Slider Enables you to increase or decrease the magnification of the file onscreen. Friday, April 6, 2018 47

LOOKUP, VLOOKUP and HLOOKUP FUNCTION EXAMPLE IMAGES EXAMPLE 1 LOOKUP VECTOR FORM COLUMN RANGE EXAMPLE: Search within a single-column range of cells EXAMPLE 2 LOOKUP VECTOR FORM ROW RANGE EXAMPLE: Search within a single-row range of cells EXAMPLE 3 LOOKUP ARRARY FORM BLOCK RANGE EXAMPLE: Search within an array of cells Friday, April 6, 2018 48

EXAMPLE 4 VLOOKUP CLASS EXAMPLE: Assign the appropriate letter-grade EXAMPLE 5 HLOOKUP CLASS EXAMPLE: Find the appropriate Diameter and Orbit Period Friday, April 6, 2018 49

Friday, April 6, 2018 50