Bird
Raised Fist0
Excelspreadsheet~20 mins

HLOOKUP function in Excel - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
HLOOKUP Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
What is the output of this HLOOKUP formula?
Given the table below in cells A1:D3:

A1: Year | B1: 2020 | C1: 2021 | D1: 2022
A2: Sales | B2: 100 | C2: 150 | D2: 200
A3: Profit | B3: 20 | C3: 30 | D3: 40

What is the result of the formula =HLOOKUP(2021, A1:D3, 3, FALSE)?
A150
B30
C40
D20
Attempts:
2 left
💡 Hint
Remember, HLOOKUP searches the first row and returns value from the specified row number.
❓ Function Choice
intermediate
2:00remaining
Which formula correctly returns the profit for year 2022?
Using the same table as above, which formula will return the profit value for 2022?
A=INDEX(A1:D3, 3, MATCH(2022, A1:D1, 0))
B=VLOOKUP(2022, A1:D3, 3, FALSE)
C=HLOOKUP(2022, A1:D3, 3, FALSE)
D=HLOOKUP(2022, A1:D3, 2, FALSE)
Attempts:
2 left
💡 Hint
HLOOKUP searches horizontally in the first row and returns value from the specified row.
📊 Formula Result
advanced
2:00remaining
What is the output of this HLOOKUP with approximate match?
Given the table:

A1: Score | B1: 0 | C1: 50 | D1: 75 | E1: 90
A2: Grade | B2: F | C2: C | D2: B | E2: A

What is the result of =HLOOKUP(80, A1:E2, 2, TRUE)?
AF
BC
CA
DB
Attempts:
2 left
💡 Hint
With approximate match TRUE, HLOOKUP finds the largest value less than or equal to lookup value.
🎯 Scenario
advanced
2:00remaining
You want to find a value but get #N/A error. What is the likely cause?
You use the formula =HLOOKUP(2023, A1:D3, 2, FALSE) on the table:

A1: Year | B1: 2020 | C1: 2021 | D1: 2022
A2: Sales | B2: 100 | C2: 150 | D2: 200
A3: Profit | B3: 20 | C3: 30 | D3: 40

But the formula returns #N/A. Why?
AThe lookup value 2023 is not found in the first row.
BThe row index 2 is invalid for the table.
CThe range A1:D3 is missing headers.
DThe formula needs TRUE instead of FALSE for exact match.
Attempts:
2 left
💡 Hint
Check if the lookup value exists in the first row when using exact match.
❓ data_analysis
expert
2:00remaining
How many items does this HLOOKUP formula return when used in an array formula?
Given the table:

A1: Month | B1: Jan | C1: Feb | D1: Mar
A2: Sales | B2: 100 | C2: 120 | D2: 130
A3: Profit | B3: 20 | C3: 25 | D3: 30

What is the result of the array formula =HLOOKUP({"Jan","Mar"}, A1:D3, 3, FALSE) entered with Ctrl+Shift+Enter in Excel?
AAn array with two values: {20, 30}
BA single value: 20
CAn error because HLOOKUP does not support arrays
DAn array with three values: {20, 25, 30}
Attempts:
2 left
💡 Hint
HLOOKUP can return multiple values when given an array of lookup values.

Practice

(1/5)
1. What does the HLOOKUP function do in Excel?
easy
A. It adds all numbers in a horizontal range.
B. It searches for a value in the first column and returns a value from a specified column to the right.
C. It searches for a value in the top row and returns a value from a specified row below.
D. It sorts data horizontally in ascending order.

Solution

  1. Step 1: Understand the function purpose

    The HLOOKUP function looks horizontally in the top row of a table to find a match.
  2. Step 2: Identify the return value

    Once it finds the match, it returns a value from a specified row below that top row.
  3. Final Answer:

    It searches for a value in the top row and returns a value from a specified row below. -> Option C
  4. Quick Check:

    HLOOKUP = horizontal lookup [OK]
Hint: HLOOKUP looks horizontally in the top row for a match [OK]
Common Mistakes:
  • Confusing HLOOKUP with VLOOKUP which searches vertically
  • Thinking it sums values instead of looking up
  • Assuming it sorts data
2. Which of the following is the correct syntax for the HLOOKUP function?
easy
A. HLOOKUP(lookup_value, row_index_num, table_array, [range_lookup])
B. HLOOKUP(table_array, lookup_value, row_index_num, [range_lookup])
C. HLOOKUP(row_index_num, lookup_value, table_array, [range_lookup])
D. HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

Solution

  1. Step 1: Recall the function parameter order

    The correct order is: lookup_value, table_array, row_index_num, and optional range_lookup.
  2. Step 2: Match with options

    HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) matches this order exactly.
  3. Final Answer:

    HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) -> Option D
  4. Quick Check:

    Syntax order matters in HLOOKUP [OK]
Hint: Remember: lookup_value first, then table, then row number [OK]
Common Mistakes:
  • Swapping lookup_value and table_array
  • Putting row_index_num before table_array
  • Omitting required parameters
3. Given the table below in cells A1:D3:

JanFebMar
Sales100150200
Profit305070

What is the result of =HLOOKUP("Feb", A1:D3, 3, FALSE)?
medium
A. 70
B. 150
C. 50
D. Error

Solution

  1. Step 1: Locate "Feb" in the top row

    "Feb" is found in cell C1, which is the third column.
  2. Step 2: Return value from row 3 in that column

    Row 3, column C contains 70 (Profit for Feb).
  3. Final Answer:

    70 -> Option A
  4. Quick Check:

    HLOOKUP finds Feb then returns row 3 value 70 [OK]
Hint: Match top row, then pick value from given row number [OK]
Common Mistakes:
  • Returning value from wrong row (e.g., row 2 instead of 3)
  • Confusing columns and rows
  • Using approximate match instead of exact
4. You wrote the formula =HLOOKUP("Q2", A1:D3, 2) but it returns incorrect data. What is the likely problem?
medium
A. You forgot to set the fourth argument to FALSE for exact match.
B. The lookup_value "Q2" is not in the top row of the table.
C. The row_index_num is too high and exceeds the table rows.
D. The table_array is missing dollar signs ($) for absolute reference.

Solution

  1. Step 1: Check if lookup_value exists in top row

    If "Q2" is not found in the top row, HLOOKUP cannot find a match.
  2. Step 2: Understand impact of missing lookup_value

    Without the value, the function returns wrong or #N/A error regardless of other parameters.
  3. Final Answer:

    The lookup_value "Q2" is not in the top row of the table. -> Option B
  4. Quick Check:

    Lookup value must be in top row [OK]
Hint: Ensure lookup_value is exactly in the top row [OK]
Common Mistakes:
  • Assuming approximate match works without FALSE
  • Using wrong row_index_num
  • Thinking absolute references fix lookup errors
5. You have a table with months in the top row (A1:D1) and sales data in rows below. You want to find the sales for "Mar" but the months are not sorted alphabetically. Which formula will always return the exact sales value for "Mar"?
hard
A. =HLOOKUP("Mar", A1:D3, 2, FALSE)
B. =HLOOKUP("Mar", A1:D3, 2)
C. =HLOOKUP("Mar", A1:D3, 3)
D. =HLOOKUP("Mar", A1:D3, 2, TRUE)

Solution

  1. Step 1: Understand the range_lookup argument

    TRUE or omitted means approximate match, which requires sorted top row.
  2. Step 2: Choose exact match for unsorted data

    FALSE forces exact match, so it works even if months are not sorted.
  3. Step 3: Verify row_index_num

    Row 2 contains sales data, so row_index_num should be 2.
  4. Final Answer:

    =HLOOKUP("Mar", A1:D3, 2, FALSE) -> Option A
  5. Quick Check:

    Use FALSE for exact match with unsorted data [OK]
Hint: Use FALSE for exact match when data is unsorted [OK]
Common Mistakes:
  • Omitting FALSE and getting wrong approximate results
  • Using wrong row_index_num
  • Assuming TRUE works for unsorted data
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard