How to Use XLOOKUP with a Fallback Message
XLOOKUP with Fallback Message is a Excel function that uses xlookup to find a value and returns a specified message if the value is not found.. Formula Genius generates and validates this formula automatically from a plain-English prompt.
Discover how to effectively use XLOOKUP to retrieve values while providing a custom message for missing data, enhancing your Excel skills.
The Formula
"Use XLOOKUP to look up a value and return a custom message when not found, without wrapping in IFERROR"
=XLOOKUP(A1, B1:B10, C1:C10, "Not Found")
This formula uses XLOOKUP to find a value and returns a specified message if the value is not found.
Step-by-Step Breakdown
- A1 is the lookup value you want to find.
- B1:B10 is the range where the formula searches for the lookup value.
- C1:C10 is the range from which the formula retrieves the corresponding value.
- "Not Found" is the custom message returned if the lookup value is not found.
Edge Cases & Warnings
- The lookup value is blank, which may return the custom message.
- The lookup value exists but is formatted differently (e.g., text vs. number).
- The lookup range contains duplicates, and the first match is returned.
- The lookup value is not present in the lookup range, triggering the fallback message.
Examples
"If A1 is 'Apple' and B1:B10 contains 'Apple', 'Banana', 'Cherry', output is 'Fruit' from C1:C10."
Fruit
"If A1 is 'Orange' and B1:B10 does not contain 'Orange', output is the fallback message."
Not Found
Frequently Asked Questions
Can I use XLOOKUP with multiple criteria?
Yes, you can combine multiple criteria using additional logic in your formula.
What happens if the lookup value is not found?
The formula will return the custom message specified in the fourth argument.
Is XLOOKUP available in all versions of Excel?
XLOOKUP is available in Excel 365 and Excel 2021.
Can't find what you need?
Describe any formula in plain English and Formula Genius will generate, explain, and validate it — instantly.