HLOOKUP Function in Excel – Formula Explained with Examples

Home/Excel Formulas/HLOOKUP Function in Excel – Formula Explained with Examples

What is the use of HLOOKUP function?

HLOOKUP is helpful to get the values from the lookup range, it search from top to bottom in Horizontal approach. VLOOKUP is useful for getting the data for lookup values by searching vertically. whare as HLOOKUP searches in Horizontally.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates


H in HLOOKUP stands for Horizoantal and HLOOKUP Function in Excel searches horizontally for lookup value and returns the value in a given row ( as per row index mentioned in the formula) that matches a value in the top most row of a table.

What is the syntax of HLOOKUP function?

=HLOOKUP(lookup_value, table_array, row_index_num

[,range_lookup])

  • lookup_value: The value to be searched in the top most row of the array.
  • table_array: The range or a range name containing the table of data.
  • row_index_num: The row number in table_array from which you return corresponding matching value
    [range_lookup]: Whether to find an exact match.
    True or 1 = Closest match is returned
    False or 0 = Exact matches are returned

Examples on HLOOKUP Function in Excel

Let us see some examples to understand HLOOKUP formula.

The data shows Square and Cube values in the rows for the columns 1 to 5.

Example 1:

=HLOOKUP(4,B4:F6,2,FALSE)

HLOOKUP Looks for the lookup value (4) in the top most row of the lookup range (first row, ie; B4:F4) and returns its corresponding value in the second row (as we mentioned row index as 2 in the HLOOKUP formula). So the result will be 16 (value found at 4th column, 2nd row)

Example 2:

=HLOOKUP(4,B4:F6,3,FALSE)

HLOOKUP Looks for the lookup value (4) in the top most row of the lookup range (first row, ie; B4:F4) and returns its corresponding value in the third row (as we mentioned row index as 3 in the HLOOKUP formula). So the result will be 64 (value found at 4th column, 3rd row)

Example 3:

=HLOOKUP(6,B4:F6,3,FALSE)

HLOOKUP Looks for the lookup value (6) in the top most row of the lookup range (first row, ie; B4:F4) and it should return its corresponding value in the third row (as we mentioned row index as 3 in the HLOOKUP formula).

This formula returns #NA as it does not found any match for lookup value in the lookup range (6 not found in in the table array or range B4:F4 ).

Example 4:

=HLOOKUP(6,B4:F6,3,TRUE)

HLOOKUP Looks for the lookup value (6) in the top most row of the lookup range (first row, ie; B4:F4) and it should return its corresponding value in the third row (as we mentioned row index as 3 in the HLOOKUP formula).

HLOOKUP returns 125 as 6 is not found in the lookup array (first row, ie; B4:F4) and we mentioned TRUE as match range type in the formula, So HLOOKUP wil search for nearest lookup value. 5 is closer to 6 and it returns its corresponding value in the third row i.e; 125.

Reference:

Please refer the below article for more Lookup & Reference Excel functions.
Lookup & Reference Excel Formulas

Please refer the below article for more Excel Functions.
Excel Formulas | Home

LIMITED TIME OFFER
By |February 14th, 2013|Excel Formulas|2 Comments

About the Author:

Excel VBA Developer having around 8 years of experience in using Excel and VBA for automating the daily tasks, reports generation and dashboards preparation. Valli is sharing to helps us automating daily tasks.

2 Comments

  1. stella November 15, 2013 at 9:59 PM - Reply

    sorry, i thought the table array is B4:F6 not B5:F7? I tried with table array B5:F7, the results are different.

    • PNRao November 16, 2013 at 12:22 AM - Reply

      Yes – you are correct, I corrected it.

      Thank you very much -PNRao!

Leave A Comment


Related pages


cbo boxofficeword 2007 add developer tab to ribbonuseful excel macrosunprotect excel workbook 2013sql server macroexcel formulas tutorial with examplesrename files vbavba floatvb6 file existsmeeting recap templategetfile vbaexcel insert tick boxvba sortinghow to convert excel to xml in excel 2007qlikview macrohow to create activex controlunprotect excel sheet 2007unprotect a workbookexcel row heighttutorial on excel pivot tablespivotal table in excelmerge cells excel 2007call function vbaexcel hide cellsmacros in spreadsheetsmsgbox vba examplesset row height in excelvba word examplestrend analysis formula in exceldashboard reporting with excel 2010remove duplicate numbers in excelhow to password protect an excel workbookexcel vba range copyexcel trim functionexcel vba formexcel commands with examplessql sas tutorialscrum meeting templateshortcut excelworksheetfunction.sumvlookup microsoft excelmacro example in excelexcel conditional statementvba switchaccess vba dirhiding in excelvba set workbook nameusing case in vbadelete blankshide and unhide columns in excelvba word userformhlookup in excel 2010 with exampleapplication.getopenfilename vbalimitation of vlookupunlock password protected excel sheetlookup function excel 2007access 2010 msgboxexcel vba activeworkbook saveashow to delete empty cellsopen excel file using vbaproject vbavba selection.sortcreating a calculator in excelvba programming basicsprotect excel worksheetminute meeting templateshow to insert a comment in excelsubstitute function excelfso folderremove duplicates vbaexcel vba book pdfexcel coding tutorialchange the row height in excelexcel consolidateexcel 2013 pivot table tutorialhow to program macros in excelselect cell vbahow to hide a row in excelexcel vba select rangeexcel vba sample projectsexcel macro caseshortcut keys of ms excel