# Google Sheets HLOOKUP Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/hlookup-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

The HLOOKUP function searches for a value in the first row of a table and returns a value in the same column from a specified row.

```
HLOOKUP(search_key, range, index, [is_sorted])
```

Generate FormulaExplain Formula

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Describe the HLOOKUP you need in plain EnglishGenerate Formula

## Parameters

**`search_key`**:\
The value that you want to search for in the first row of the specified `range`.

**`range`**:\
The range of cells that contains the data you want to search through. The first row of this range is where the `search_key` will be looked up.

**`index`**:\
The row number in the `range` from which to return the value. The first row is 1, the second row is 2, and so on.

**`is_sorted`**:\
An optional parameter that indicates whether the first row of the `range` is sorted. If TRUE or omitted, an approximate match is returned; if FALSE, an exact match is required.

## What is an HLOOKUP?

The *HLOOKUP* function in Google Sheets is a useful tool that allows you to search for a value in the first row of a range or array and return a corresponding value from a specified row within that range. It is particularly helpful when dealing with horizontal data layouts, making it easier to retrieve information from tables organized in rows.

In simpler terms, HLOOKUP enables you to find specific data in a horizontal table and retrieve related information from that table efficiently.

## A Practical Example

Imagine you are managing a student database with their scores stored in a Google Sheets spreadsheet:

### Students Table:

| StudentID | Name | Math | Science | English |
| - | - | - | - | - |
| 001 | Alice | 85 | 90 | 88 |
| 002 | Bob | 78 | 82 | 80 |
| 003 | Charlie | 92 | 95 | 94 |

You want to find the score of each student in a specific subject.

## HLOOKUP Formula

To achieve this, you would use the HLOOKUP function as follows:

```
=HLOOKUP("Math", Students!A1:E4, 3, FALSE)
```

In this formula:

- `"Math"` is the value you are searching for in the first row of the Students Table.
- `Students!A1:E4` is the range where the function will look for the subject name and return the corresponding scores.
- `3` indicates that you want to return the value from the third row of the specified range.
- `FALSE` specifies that you want an exact match for the search.

## Result of the Formula

When you apply the HLOOKUP formula, the output would show the Math scores as follows:

| Subject | Score |
| - | - |
| Math | 85 |
| Math | 78 |
| Math | 92 |

If you were to change the subject in the HLOOKUP formula to "Science", the result would update accordingly:

```
=HLOOKUP("Science", Students!A1:E4, 3, FALSE)
```

This would return:

| Subject | Score |
| - | - |
| Science | 90 |
| Science | 82 |
| Science | 95 |

## Why Use HLOOKUP?

HLOOKUP is beneficial because it simplifies the process of looking up data in horizontal tables. It allows for quick retrieval of information without the need for complex formulas. However, it is important to note that HLOOKUP can only search for values in the first row of the specified range, which may limit its versatility compared to other lookup functions.

## Key Takeaways:

- **HLOOKUP**: A Google Sheets function that searches for a value in the first row and returns a corresponding value from a specified row.
- **Horizontal Data**: Ideal for tables organized in rows, making it suitable for specific data layouts.
- **Exact Match**: Offers the ability to specify whether you want an exact match or an approximate match.
- **Common Use Cases**: Useful for retrieving scores, product information, or any scenario where data is organized horizontally.

HLOOKUP is a valuable function for anyone working with horizontal data in Google Sheets, providing a straightforward way to enhance data analysis and reporting capabilities.

Happy spreadsheeting!

## Example use case

You have a table where Row 1 contains product IDs and Row 2 contains their corresponding prices. You can use HLOOKUP to enter a product ID and quickly retrieve its price. This streamlines pricing queries and enhances inventory management efficiency.

## Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Merge Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-merge-cells-in-google-sheets)
- [How To Multiply In Google Sheets](https://betteranalyst.com/google-sheets/how-to-multiply-in-google-sheets)
- [How To Password Protect An Google Sheets File](https://betteranalyst.com/google-sheets/how-to-password-protect-an-google-sheets-file)
- [How To Remove Blank Rows In Google Sheets](https://betteranalyst.com/google-sheets/how-to-remove-blank-rows-in-google-sheets)
- [How To Remove Duplicates In Google Sheets](https://betteranalyst.com/google-sheets/how-to-remove-duplicates-in-google-sheets)
- [How To Separate Names In Google Sheets](https://betteranalyst.com/google-sheets/how-to-separate-names-in-google-sheets)
- [How To Sort In Google Sheets](https://betteranalyst.com/google-sheets/how-to-sort-in-google-sheets)
- [How To Split Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-split-cells-in-google-sheets)

## Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

## Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

1. [01ChatGPTOpen a balanced comparison prompt in ChatGPT.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.
