VLookup and HLookup in Microsoft Excel

Slides:



Advertisements
Similar presentations
Cell Referencing Absolute Reference: A reference that does not change when copied. It is specified with a dollar sign in front of both the row and column.
Advertisements

Pre-defined System Functions Simple IF & VLOOKUP.
Calling all Data Geeks! Corey McAfee October 24, 2014 Corey McAfee October 24, 2014.
Tutorial 7: Using Advanced Functions and Conditional Formatting
In Business Series © Prentice Hall Microsoft Office Excel 2007 In Business Core Chapter 4 Evaluating Data.
Pradeep Velugoti Lakshman Tallam.  Type in the month name “January” in any cell say A1.  Now drag the fill handle to the right to select the range (Do.
1 CA202 Spreadsheet Application Working with Database Data Lecture # 14.
Computer Science & Engineering 2111 Vlookup and Hlookup Functions Syntax 1CSE 2111 Lecture Vlookup and Hlookup.
259 Lecture 4 Spring 2010 Logical Functions and Conditional Formatting in Excel.
Turning Numbers Into Knowledge Nate Moore MBA, CPA, CMPE.
MICROSOFT EXCEL – TRAINING FOR QC DIETETIC INTERNS Stephanie Brooks – Fall 2014.
CS1100: Computer Science and Its Applications Table Lookup and Error Processing Martin Schedlbauer, Ph.D.
ACOT Intro/Copyright Succeeding in Business with Microsoft Excel 2010.
Tutorial 8: Working with Advanced Functions
REACH-CRC © 2012 REACH-CRC. All Rights Reserved.FALL 2012.
Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.
ADVANCED EXCEL FORMULAS 1 Lesson 8. Named Ranges Name a cell or a range of cells Can make formulas easy to understand =SUM(Sales) instead of =SUM(A2:A16)
LOGO Chapter VI Advanced Functions 1. LOGO Overview  INTRODUCTION  NESTED FUNCTIONS  LOOKUP  VLOOKUP  COUNTIF  SUMIF  IF  ROUND  THE PMT, IPMT.
COMPREHENSIVE Excel Tutorial 7 Using Advanced Functions, Conditional Formatting, and Filtering.
1 Use a cell value as a KEY to a table to find and return a specific element to another cell or use in a calculation.
REACH-CRC © 2012 REACH-CRC. All Rights Reserved.FALL 2012.
REACH-CRC © 2012 REACH-CRC. All Rights Reserved.FALL 2012.
CS&E 1111 Exreference Microsoft Excel Reference Functions Objectives: l Understanding and using Reference Functions l The computer’s algorithm l Syntax.
Chapter 12 Creating Formulas that Look Up Values Microsoft Excel 2003.
REACH-CRC © 2013 REACH-CRC. All Rights Reserved.Spring 2013.
1 CSE 2337 Chapter 5 Retrieving Data with Lookups.
RevisionRevision Function in Spreadsheet DATE Returns the serial number of a particular date. Syntax –DATE(year,month,day) year is a number from 1900.
CIS 300- Professor Im Test #2. MICROSOFT ® EXCEL ® LOOKUP FUNCTIONS Syntax: =VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup]) Arguments:
CIS300 Exam 4 Review Dale McIntosh © 2009 Dale McIntosh. All Rights Reserved.Spring 2009.
LOOKUP FUNCTIONS Excel Lesson 10. LOOKUP FUNCTIONS Allow the user to find data in other cells in the spreadsheet and place them in the current cell VLOOKUP:
VLOOKUP Function Tech Tuesday January 5, What is VLOOKUP? A Function in Excel (and also in Google Sheets) for finding specific information in.
CIS 300- Professor McIntosh Test #3. MICROSOFT ® EXCEL ® MATHEMATICAL FUNCTIONS Syntax: =ROUND(number, num_digits) Arguments: number Required  The number.
MS-EXCEL PART 3. Use data validation in Excel to make sure that users enter certain values into a cell. Data Validation Example In this example, we restrict.
CIS300 Test Review REACH-CRC © 2012 REACH-CRC. All Rights Reserved.FALL 2012.
CIS300 Test 3 Review Reinhardt. © 2009 Dale McIntosh. All Rights Reserved. Slides are Available at: uter/cistestreviews.html.
Logical Functions and Conditional Formatting in Excel
Advanced Excel Helen Mills OME-RESA.
Using Advanced Formulas
Chapter 2 Analytics on Spreadsheets
VLOOKUP HLOOKUP INDEX + MATCH
MSAA PRESENTS: AN EXCEL TUTORIAL
Contents Introduction Text functions Logical functions
Elena Lazarevska, City of Boulder
Chapter 2 Analytics on Spreadsheets
TRACKER Contents Intro Excel 101 Math Operations Formulas 101.
Microsoft Excel VLOOKUP Deborah Trujillo Instructional Technology
Excel IF Function.
2007 MICROSOFT EXCEL INTERMEDIATE
Analyzing Table Data.
VLOOKUP Finds an entry from a vertical array based on a criteria
CS1100: Computer Science and Its Applications
VLOOKUP Finds an entry from a vertical array based on a criteria
How To Use VLOOKUP In Microsoft Excel
ITI 091 MS Excel Level III 9/18/2018
VLOOKUP functions Data Analysis.
Advanced Microsoft Excel
ITI 305 MS Excel Level III 11/20/2018
Introduction to the Case
MS Excel 2016 Level III 12/6/2018 Copyright © Carl M. Burnett.
Operate A Spreadsheet Application Advanced
Going through the Big “D”
Vlookup.
MIS2502: Data Analytics ETL - Excel Basics
MS Excel 2016 Level III Montgomery County Government (MCG)
Excel Tips and Tricks Presented by: Tracee Baker, Business Analyst, TD Ameritrade July 21, /3/2019.
Topic 5 – Table Lookup Lesson 3 - Advanced Lookup
ITI 091 MS Excel Level III 4/9/2019
REACH CRC Professor Manni
Lesson 5 Topic 1 – Table Lookup and Error Handling
Spreadsheets Vlookups.
Presentation transcript:

VLookup and HLookup in Microsoft Excel

VLookup Searches for a value in the first column of a table array and returns a value in the same row from another column in the table array. Collingsworth 1 Comanche Dallas 16 Denton 6 El Paso 4 Ellis 2 Fannin Fort Bend Galveston

HLookup Searches for a value in the top row of a table or an array of values, and then returns a value in the same column from a row you specify in the table or array. El Paso Ellis Fannin Fort Bend Galveston 4 2 1

Syntax VLOOKUP (lookup_value, table_array, col_index_num, range_lookup) What you’re looking for Where you’re going to look What you want to know Is ‘close’ good enough? HLookup has the same syntax, with “row_index_num” instead of “col_index_num”. We’ll talk about VLookup today.

lookup_value The value to search for in the first column of the table array. If lookup_value is smaller than the smallest value in the first column of the table array, VLookup returns the #N/A error value.

table_array Data in columns. If the table is not sorted in ascending order on the first column, the function can give unpredictable results. Use ‘absolute’ references. (Put a $ before the letters and numbers in the references, i.e. $A$2:$B$255) Do not include column headers

col_index_num The column number in the table array from which the matching value must be returned. A col_index_num of 1 returns the value in the first column in the table array; col_index_num of 2 returns the value in the second column, and so on.

range_lookup A logical (True/False) value that specifies whether you want VLookup to find an approximate match or an exact match. Defaults to “True”. You will almost always want it to be “False”.

VLookup were looking for What would happen if VLookup were looking for Dallam County in this table and returning the second column? Collingsworth 1 Comanche Dallas 16 Denton 6 El Paso 4 Ellis 2 Fannin Fort Bend Galveston With range_lookup left as “True”, the value for Comanche County will be returned. With range_lookup set to “False” an error message will show that Dallam County was not found. We can deal with error messages!!

Why would we submit ourselves to such a complicated function? SO WHAT ?!?!?! Why would we submit ourselves to such a complicated function?

Incidence Rate by County Combine data tables Case Count by County Population by County Incidence Rate by County

Example Two worksheets: “Case Count” has a list of case counts by county. “County Population” has a list of all counties with their populations.

County =VLOOKUP(A2,'Case Count'!$A$1:$B$58,2,FALSE) This formula will return an error for any county that has no cases. What we really want is 0 This is where it gets complicated…

Handling Errors This is where I lose people… If the original formula gives an error, we want a zero. Otherwise we want the result of the original formula. The Excel function IfError() will let us choose between the value of a function (vlookup) or another value if the function returns an error.

=IfError([original formula], 0)

=IFERROR(VLOOKUP(A2,'Case Count'!$A$1:$B$58,2,FALSE),0)

Where might we use True for the range_lookup parameter? To group numeric values into ranges.

VLookup were looking for What would happen if VLookup were looking for 24 in this table and returning the second column? 0 - 4 5 5 - 9 10 10 - 17 18 18 - 24 25 25 - 34 35 35 - 44 45 45 - 54 55 55 - 64 65 65+ With range_lookup set to “False” an error message will show that 24 was not found. We don’t want an error message, or a default value. We want an ANSWER!

VLookup were looking for What would happen if VLookup were looking for 24 in this table and returning the second column? 0 - 4 5 5 - 9 10 10 - 17 18 18 - 24 25 25 - 34 35 35 - 44 45 45 - 54 55 55 - 64 65 65+ With range_lookup set to “True”, Vlookup will start at the top of the table, work its way down to the last value in column 1 that is earlier in the sort than the lookup_value. The table MUST be sorted by the first column!! You will get wrong answers, and it may not be obvious that they are wrong. In this version of Vlookup, there are no error messages for missing values.

Investigation ID2 Age Reported Birth Time Event Date Age Age Group CAS482442134TX01 49 7/8/1966 11/21/2015 45 - 54 CAS482247044TX01 53 7/18/1961 2/14/2015 CAS482247047TX01 59 7/22/1955 3/5/2015 55 - 64 CAS482247055TX01 8 6/18/2014 3/3/2015 0 - 4 CAS482247057TX01 47 5/19/1967 CAS482247060TX01 1 8/14/2013