Use HLOOKUP to retrieve horizontal data in Google Sheets

Learn how to use HLOOKUP to search across top rows and return values from rows beneath—covers exact and approximate matches, error handling, and a dynamic row index with MATCH.

What the video covers

Short, practical instructions for applying HLOOKUP in Google Sheets to extract row-based values from a horizontally organized table.

Watch the video on YouTube

Step-by-step instructions

  1. Open your sheet and identify lookup pieces
    Locate the cell containing your lookup value (for example A2 = "Q3"), and select the cell where you want the result to appear (for example B2). Confirm the horizontal table range that contains the headers in its top row (e.g., C1:G10).
  2. Enter a standard exact-match HLOOKUP
    Type a formula that uses FALSE (or 0) for an exact match, for example: =HLOOKUP(A2, C1:G10, 3, FALSE). Here A2 is the lookup value, C1:G10 is the table range, and 3 returns the value from the 3rd row of that range.
  3. Force exact matches to avoid wrong results
    Always use FALSE (or 0) as the fourth argument when your headers are not sorted. This prevents HLOOKUP from returning the nearest match instead of an exact header match.
  4. Use approximate match when appropriate
    If headers are sorted ascending and you need the closest value less than or equal to the lookup term, set the fourth parameter to TRUE (or 1), for example: =HLOOKUP(A2, C1:G10, 3, TRUE).
  5. Handle missing headers or errors gracefully
    Wrap HLOOKUP with IFERROR to avoid #N/A messages, e.g.: =IFERROR(HLOOKUP(A2, C1:G10, 3, FALSE), "Metric Not Found").
  6. Make the row index dynamic with MATCH (advanced)
    Replace the fixed row index with MATCH to find the row by name, e.g.: =HLOOKUP(A2, C1:G10, MATCH("Revenue", C1:C10, 0), FALSE). This adapts if rows are added or moved.

Watch the video

Video thumbnail for Use HLOOKUP to retrieve horizontal data in Google Sheets Play tutorial

Watch on YouTube

Why it matters

Tables are often arranged with headers across the top. HLOOKUP searches those headers and returns a value from a specified row below, making it ideal for wide matrices, quarterly reports, and other horizontal layouts.

Check your result

Result should display the value from the requested row that corresponds to the matched header. If no header matches and exact match is used, IFERROR can show a friendly message (e.g., "Metric Not Found").

Troubleshooting

If HLOOKUP returns #N/A: verify the lookup value exactly matches a header (or switch to approximate mode with sorted headers). If HLOOKUP returns an unexpected value, confirm the row index refers to the correct row within the selected range. Use IFERROR to replace error messages with a custom note.