# HLOOKUP Function in Excel With Examples

Excel has several functions to search data from a table. **HLOOKUP() **function is one of them. The ‘H’ in the HLOOKUP() function stands for *‘horizontal’.* This function generally helps to find a value from a row of an array or table. For this function to work the lookup value must be in the first row of the table or array. HLOOKUP() moves downward searches for the required output. Like ** VLOOKUP()** this function also supports exact and approximate match.

HLOOKUP() function is used when the user tries to find a value in a table by matching a lookup value in the first row of the table. Generally, the user wants an exact match. This function searches for a value horizontally as its name means.

**Syntax:**

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

Here [range_lookup] argument is optional.

So, basically HLOOKUP() takes four arguments as input and returns the desired output.

**Arguments:**

This is the value( maybe a value, a reference, or a text string) that HLOOKUP() function tries to match in the first row of the table. This argument must be provided by the user.__lookup_value (Required):__This is the table or the reference of a table where the HLOOKUP() function tries to match the__table_array (Required):__*lookup_value*and searches for the output. Also, this argument must be provided by the user.This is the row number where the HLOOKUP() function searches for the output. This argument should be provided by the user. This value cannot be less than 1 or greater than the number of rows in the__row_index_num (Required):__*table_array*. In both cases, this function shows an error(#VALUE! Or #REF!).This is an optional argument. It contains a logical value(TRUE or FALSE) by which HLOOKUP() can understand if the user wants an approximate or an exact match. This value is TRUE by default(If the user does not provide any value). TRUE denotes an approximate match and FALSE denotes an exact match.__[range_lookup] (Optional):__

Note:If [range_lookup] value is FALSE and the user wants to match a text partially, then wildcards(‘*’ or ‘?’) can be used. An asterisk matches a sequence and question mark matches a single character. And this function is not case-sensitive.

**Return Value: **HLOOKUP() first matches the lookup value in the first column of the table and then moves downward to search the output value. After all, it returns that output value.

**Example:**

The list below is taken for the example:

Product Name | Computer | Television | Printer | Keyboard | Speakers |
---|---|---|---|---|---|

In stock | 22 | 18 | 17 | 16 | 15 |

Sold | 2 | 5 | 8 | 10 | 11 |

Price per item | 30000 | 18000 | 15000 | 800 | 500 |

In the above list HLOOKUP() function is applied:

HLOOKUP function | Result | Description |
---|---|---|

HLOOKUP(C1, A1:F4, 3, FALSE) | 5 | Here the user wants an exact match for the lookup value “Television” and wants the output from the 3rd row. |

HLOOKUP(“TELEVISION”, A1:F4, 3, FALSE) | 5 | This result proves that the HLOOKUP function is not case-sensitive. |

HLOOKUP(12,A3:F4, 2, TRUE) | 500 | Here the user wants an approximate match for the lookup value 12 and wants the output from the 2nd row of the table array. If TRUE is omitted in this function it will return the same result. |

**Output:**