← Back to quizzesFree quiz

Excel Lookup and Data Functions

Excel provides powerful lookup functions that let you search for data, retrieve related values, and build dynamic spreadsheets. This course focuses on the modern XLOOKUP function, its…

21 questions~11 min
Excel Lookup and Data Functions — Qwi
0 / 21
Score: 0%
1

Which function can replace both VLOOKUP and HLOOKUP?

2

What argument in XLOOKUP specifies the message when a value is not found?

3

In the formula =XLOOKUP(A15,A3:A12,B3:B12,"Not Found"), which range provides the values to return?

4

What will XLOOKUP return if the "if_not_found" argument is omitted and the lookup fails?

5

Which function combination allows a left‑lookup that VLOOKUP cannot perform easily?

6

What does the MATCH function return?

7

In =INDEX(return_array, MATCH(A15, A3:A12, 0)), what does the 0 argument in MATCH mean?

8

If the Category column is removed, will the INDEX+MATCH formula still work?

9

Which function adds numbers only for rows that meet a specific condition?

10

What is the correct syntax to count how many cells contain the text "Electronics" in range C3:C16?

11

Which of the following formulas correctly sums sales for the "Accessories" category?

12

How would you write a SUMIFS formula to total sales where Category is "Electronics" and City is "Delhi"?

13

What will the formula =COUNTIFS(C3:C16,"Electronics", D3:D16,"Mumbai") return?

14

Which conditional formatting rule highlights cells with a value greater than 1 (i.e., 100%)?

15

What formula would you use to flag an entire row when the Performance % in column F is below 0.9?

16

In data validation, which formula prevents duplicate entries in the range A3:A15?

17

Which function would you use to calculate the total revenue from a table named Table1?

18

When using Goal Seek to achieve a target profit, which cell should be set as the 'By Changing Cell'?

19

If you want to count invoices with sales amount greater than 20,000, which criterion is correct?

20

Which of the following is a valid way to reference the lookup array for Product IDs in the XLOOKUP examples?

21

What does the formula =IF(F2>=1,"Target Achieved",IF(F2>=0.9,"Near Target","Needs Improvement")) return when Performance % is 0.85?

Understanding Excel Lookup Functions

Excel provides powerful lookup functions that let you search for data, retrieve related values, and build dynamic spreadsheets. This course focuses on the modern XLOOKUP function, its arguments, and how it compares to classic combinations like INDEX + MATCH. By the end of this lesson, you will be able to replace traditional VLOOKUP and HLOOKUP formulas, handle missing values gracefully, and perform left‑lookups without complex work‑arounds.

Why XLOOKUP Is a Game‑Changer

For years, Excel users relied on VLOOKUP for vertical searches and HLOOKUP for horizontal searches. Both functions have limitations:

  • They require the lookup column to be the leftmost (or topmost) column of the table.
  • They cannot easily return values from columns to the left of the lookup column.
  • Handling missing data often required nested IFERROR or IFNA wrappers.

The new XLOOKUP function, introduced in Excel 365, eliminates these constraints. It can search both vertically and horizontally, return values from any column, and includes a built‑in argument for custom messages when a lookup fails.

Replacing VLOOKUP and HLOOKUP with XLOOKUP

When asked, "Which function can replace both VLOOKUP and HLOOKUP?", the correct answer is XLOOKUP. This single function combines the capabilities of both older lookup functions while adding extra flexibility.

Typical XLOOKUP syntax:

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

Key points:

  • lookup_value – the value you want to find.
  • lookup_array – the range where Excel searches for the lookup value.
  • return_array – the range that contains the values you want to return.
  • if_not_found – optional text or value displayed when the lookup fails.

Customizing the "Not Found" Message

One of XLOOKUP’s most useful arguments is if_not_found. It lets you define a friendly message instead of the default #N/A error. For example, the question "What argument in XLOOKUP specifies the message when a value is not found?" points to the if_not_found argument.

Example:

=XLOOKUP(A15, A3:A12, B3:B12, "Not Found")

If A15 does not exist in A3:A12, the formula returns the text "Not Found" instead of an error.

Understanding Return Arrays

In the same formula, the range that provides the values to return is the return_array. The quiz question "In the formula =XLOOKUP(A15,A3:A12,B3:B12,\"Not Found\"), which range provides the values to return?" confirms that B3:B12 is the return array.

Remember:

  • The lookup_array and return_array must be the same size.
  • You can reference entire columns (e.g., A:A) for dynamic ranges.

Default Behavior When if_not_found Is Omitted

If you omit the if_not_found argument and the lookup fails, XLOOKUP returns the standard #N/A error. This is highlighted by the quiz question "What will XLOOKUP return if the \"if_not_found\" argument is omitted and the lookup fails?". Knowing this default helps you decide when to include a custom message or wrap the formula in IFERROR for additional handling.

Performing Left‑Lookups with INDEX + MATCH

Before XLOOKUP, many users combined INDEX and MATCH to achieve left‑lookups—searching for a value in a column and returning a result from a column to its left. The quiz asks, "Which function combination allows a left‑lookup that VLOOKUP cannot perform easily?", and the answer is INDEX + MATCH.

How it works:

=INDEX(return_array, MATCH(lookup_value, lookup_array, 0))

Here, MATCH finds the position of lookup_value within lookup_array, and INDEX returns the value from return_array at that position.

What MATCH Returns

The MATCH function returns a position number—the relative row (or column) where the lookup value is found. This is confirmed by the quiz question "What does the MATCH function return?". It does not return the actual value, a Boolean, or an error code (unless the value is not found).

Exact Match Mode in MATCH

When using MATCH, the third argument determines the type of match. A 0 indicates an exact match. The quiz question "In =INDEX(return_array, MATCH(A15, A3:A12, 0)), what does the 0 argument in MATCH mean?" reinforces this concept.

Other match modes:

  • 1 – finds the largest value less than or equal to the lookup value (requires sorted data).
  • -1 – finds the smallest value greater than or equal to the lookup value (also requires sorted data).

Robustness of INDEX + MATCH When Columns Change

One advantage of the INDEX + MATCH approach is its resilience to column rearrangements. The quiz asks, "If the Category column is removed, will the INDEX+MATCH formula still work?". The correct answer is Yes, because the formula references ranges directly rather than relying on column positions.

To ensure this robustness:

  • Use absolute references (e.g., $A$3:$A$12) if you plan to copy the formula across cells.
  • Prefer named ranges for clarity and maintainability.

Best Practices for SEO‑Friendly Excel Content

When creating tutorials or blog posts about Excel lookup functions, keep these SEO tips in mind:

  • Use clear headings with keywords like "XLOOKUP tutorial", "INDEX MATCH left lookup", and "Excel lookup functions".
  • Include code snippets wrapped in <pre><code> tags for readability.
  • Write concise, descriptive paragraphs that answer common search queries (e.g., "how to replace VLOOKUP with XLOOKUP").
  • Utilize semantic HTML (<h2>, <h3>, <p>, <ul>, <li>) to help search engines understand the content hierarchy.
  • Add internal links to related topics such as "Excel IFERROR" or "dynamic named ranges".

Putting It All Together: A Sample Worksheet

Below is a step‑by‑step example that demonstrates both XLOOKUP and INDEX + MATCH in a single worksheet.

  1. Set up your data in columns A and B.
    A | Product
    ---|--------
    1 | Apple
    2 | Banana
    3 | Cherry
    4 | Date
    5 | Elderberry
  2. Use XLOOKUP to find the price of "Cherry".
    =XLOOKUP("Cherry", A2:A6, B2:B6, "Price not found")
  3. Apply INDEX + MATCH for a left‑lookup (e.g., find the product name from a price column placed to the right).
    =INDEX(A2:A6, MATCH(3.99, B2:B6, 0))
  4. Test error handling by searching for a value that does not exist.
    =XLOOKUP("Fig", A2:A6, B2:B6, "Not available")
    This returns "Not available" instead of #N/A.

By experimenting with these formulas, you’ll see how XLOOKUP simplifies many tasks while still appreciating the flexibility of the classic INDEX + MATCH combo.

Quick Reference Cheat Sheet

  • XLOOKUP: =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
  • INDEX + MATCH: =INDEX(return_array, MATCH(lookup_value, lookup_array, 0))
  • MATCH modes: 0 = exact, 1 = less‑than/equal (sorted), -1 = greater‑than/equal (sorted)
  • Handling missing data: Use if_not_found in XLOOKUP or wrap formulas with IFERROR for legacy functions.

Conclusion

Mastering Excel’s lookup functions empowers you to build dynamic, error‑resilient spreadsheets. Whether you adopt the modern XLOOKUP or rely on the proven INDEX + MATCH technique, understanding each argument, return array, and match mode is essential. Use the concepts covered in this course to replace outdated formulas, create user‑friendly error messages, and maintain robust data models that stand up to column changes and evolving data structures.