Excel HLOOKUP Function - Microsoft Excel HLOOKUP Function Tutorial

Excel HLOOKUP Function - Microsoft Excel HLOOKUP Function Tutorial

Excel HLOOKUP Function - Microsoft Excel HLOOKUP Function Tutorial

The HLOOKUP Function looks up a value you designate in the first row of a worksheet area and returns a value from the column it finds the lookup value in. Used to merge tables, construct dashboards and perform various data processing tasks.

What is the Microsoft Excel HLOOKUP Function?

The HLOOKUP function is a computer program that you run from a worksheet cell formula. It looks up a value you designate in the first row of a worksheet area (called a range) and returns a value from the column it finds the lookup value in. You run the HLOOKUP worksheet function by typing its name in a formula then followed by the information it is suppose to use. The HLOOKUP worksheet function is used in applications when you have to look up prices, name information, scientific data anything that is contained in a table. It can also be used to merge two tables together transferring information from one to the other. The H in HLOOKUP stands for horizontal. There is also another function called VLOOKUP that looks along the first column of a table. Use VLOOKUP when your comparison values are located in the first column of the data that you want to find. Note that this function also has the capability to search for parts of text within other text when evaluating its lookup value.


How Do You Type the HLOOKUP Worksheet Function in a Formula?

Whenever you type a formula in a worksheet cell, this is called syntax or grammar. The general HLOOKUP function syntax has a format like this when you type it in a worksheet cell:

= HLOOKUP( lookup_value, table_array, row_index_num, [range_lookup] )

Where lookup_value, table_array, row_index_num, [range_lookup] are called the function argument list. Remember, you are running a computer program at this point so the program needs information to operate and that is why there is an argument list. When you see an argument list and you see square brackets [ ] around the argument name, this means the argument is optional and you do not have to include it when typing unless you need it. So for the syntax above, you need to include 3 arguments for the HLOOKUP worksheet function when typing it in a worksheet cell formula in order for it to calculate correctly. What argument values can be used are discussed below. Remember functions expect certain things in their argument lists, if you do not put the correct information in the list they will generate an error when run.


VLOOKUP Worksheet Function Argument Definitions


How Do You Run the HLOOKUP Function?

Since the HLOOKUP function is a computer program, it runs when you press Enter to enter the formula that contains it. If any of the arguments are wrong, the function will return an error.


What Do I Type for a HLOOKUP Function Argument?

When typing the HLOOKUP function in a worksheet cell formula, you need to replace the argument list with arguments separating each one with a comma (,). Some typical arguments you can use are:

Cell Formula Explanation
= HLOOKUP( "Widgets", A1:D5, 2, FALSE ) Find Widgets in the A1:D1 range then return information from row 2 in the column that Widgets was found in
= HLOOKUP( "*ST*", G1:J5, 4, FALSE ) Find the piece of text ST inside the cell value text in the G1:J1 range then return information from row 4 in the column that ST was found in
= HLOOKUP( "*" & B1 & "*", G1:J5, 2, FALSE ) Find the piece of text from the B1 cell value inside the text in the G1:J1 range then return information from row 2 in the column that the text was found in
= HLOOKUP( 16, B1:D5, 5, FALSE ) Find number 16 in the B1:D1 range then return information from row 5 in the column that 16 was found in
= HLOOKUP( B1, Prices, 3, FALSE ) Find the B1 cell value in range name Prices first row then return information from row 3 in the column that the B1 cell value was found in *

* This function is used a great deal in building adaptive formulas that figure out ranges, start and stop of data.... It is also heavily used in dashboard design tying numeric ActiveX control outputs into formulas that seek out data in tables.


Additional VLOOKUP Function Examples

The worksheet seen below contains some typical worksheet formulas that run the VLOOKUP worksheet function. Pay close attention to the argument list and the syntax used to write the formula.

A B C
1 Searching by Names
2
3 Item Cost
4 Widget1 $1.25
5 Widget2 $2.50
6 Widget3 $3.50
7
8 Look up Cost header and return info about Widget1 cost. Formula below
9 Widget1 $1.25 = HLOOKUP( "Cost", A3:B6, 2, FALSE )
10
11 Item Cost Allow user to search for header Cost and return info about Widget1 cost. Formula below
12 Widget1 $1.25 = HLOOKUP( B11, A3:B6, 2, FALSE )
13
14 Item Cost Allow user to search for Cost header, use range name Widgets in place of A3:B6 much easier, can be on different sheet. Formula below
15 Widget1 $1.25 = HLOOKUP( B14, Widgets, 2, FALSE )
16


Things to Know About the HLOOKUP Function

Next Excel Training Dates - Public Training and Live Online Courses

Our next public Excel training workshops and live online Excel courses are listed below. For all of the dates and times, please visit our Training Schedule page using the link above in the main menu.

Business, Engineering and Science
Beginning Excel Training for Business Professionals Intermediate Excel Training for Business Professionals Advanced Excel Training for Business Professionals Beginning Excel VBA Training for Business Professionals Intermediate Excel VBA Training for Business Professionals Advanced Excel VBA Training for Business Professionals Advanced Excel Training for Engineers / Scientists Beginning Excel VBA Training for Engineers / Scientists Intermediate Excel VBA Training for Engineers / Scientists Advanced Excel VBA Training for Engineers / Scientists Microsoft Excel Dashboards Training for Combined Audience
Beginning Excel Training for Business
Next Date:
See Schedule
Intermediate Excel Training for Business
Next Date:
See Schedule
Advanced Excel Training for Business
Next Date:
See Schedule
Beginning Microsoft Excel VBA Training for Business
Next Date:
See Schedule
Intermediate Microsoft Excel VBA Training for Business
Next Date:
See Schedule
Advanced Microsoft Excel VBA Training for Business
Next Date:
See Schedule
Advanced Excel Training for Engineers / Scientists
Next Date:
See Schedule
Beginning Excel VBA Training for Engineers / Scientists
Next Date:
See Schedule
Intermediate Excel VBA Training for Engineers / Scientists
Next Date:
See Schedule
Advanced Excel VBA Training for Engineers / Scientists
Next Date:
See Schedule
Microsoft Excel Dashboard Training
Next Date:
See Schedule

Public Training Location

  • Santa Barbara, CA
  • Los Angeles, CA
  • Pasadena, CA
  • Reseda, CA
  • Chatsworth, CA
  • Topanga, CA
  • Santa Clarita, CA
  • Newbury Park, CA
  • Camarillo, CA
  • Calabasas, CA
  • Valencia, CA
  • West Hollywood, CA
  • Goleta, CA
  • Palmdale, CA
  • San Fernando, CA
  • Burbank, CA
  • La Canada, CA
  • Altadena, CA
  • Culver City, CA
  • Rosemead, CA
  • Anaheim, CA
  • El Segundo, CA
  • Fillmore, CA
  • Gardena, CA
  • Encino, CA
  • Oxnard, CA
  • Mojave, CA
  • La Crescenta, CA
  • Glendale, CA
  • Flintridge, CA
  • Beverly Hills
  • Arcadia, CA
  • Inglewood, CA
  • Hawthorne, CA
  • Manhattan Beach, CA
  • Santa Paula, CA
  • Century City, CA
  • Sherman Oaks, CA
  • Reseda, CA
  • Woodland Hills, CA
  • Hollywood, CA
  • Studio City, CA
  • Fillmore, CA
  • Ventura, CA
  • Moorpark, CA
  • Simi Valley, CA
  • Santa Monica, CA
  • Encino, CA

EMAGENIT performs Excel onsite company training in the cities listed above as well as the entire Northern and Southern California areas, United States and Canada.

LinkedIn
Facebook
Information
Need Help? Please call us at 1.866.924.6244

Copyright © 2002-2017

EMAGENIT All Rights Reserved