XLOOKUP
XLOOKUP
XLOOKUP
Comprehensive
Guide to
XLOOKUP
Jacek Cetnarski
XLOOKUP
www.eexcel.co.uk 1
XLOOKUP
SYNTAX
=XLOOKUP
(Lookup_value ,Lookup_array ,Return_array ,
[If_not _found] ,[Match_mode] ,[Search_mode] )
1. Lookup_value
2. Lookup_array
3. Return_array
4. [If_not_found]
5. [Match_mode] – default FALSE – Exact match
[] – optional arguments
www.eexcel.co.uk 2
XLOOKUP
Simple example
=XLOOKUP(B2,C5:C16,B5:B16)
www.eexcel.co.uk 3
XLOOKUP
&
Multiple Criteria Using the concatenate operator &
You can use the concatenate operator & to retrieve items from a
table using multiple criteria.
=XLOOKUP(B2&C2,B5:B16&C5:C16,D5:D16)
www.eexcel.co.uk 5
XLOOKUP
You can use the XLOOKUP function and simple Boolean logic
expressions to return data with multiple criteria.
=XLOOKUP(1,(B5:B16=B2)*(C5:C16=C2),D5:D16)
www.eexcel.co.uk 6
XLOOKUP
=VLOOKUP(B2&C2,A5:D16,4,0)
www.eexcel.co.uk 7
XLOOKUP
TWO-DIMENSIONAL LOOKUP
2D
How to create two-dimensional lookup formula?
#1 Create formula for Vertical Search Value
=XLOOKUP(C2,B7:B18,C4:H10)
#2 Create formula for Horizontal Search Value
=XLOOKUP(C3,C6:E6,C7:E18)
#3 Combine one formula with another in the 3rd argument.
=XLOOKUP(C2,B7:B18,XLOOKUP(C3,C6:E6,C7:E18))
=VLOOKUP(C2,B7:E18,MATCH(C3,B6:E6,0),0)
www.eexcel.co.uk 8
XLOOKUP
RETURN A RANGE
www.eexcel.co.uk 9
XLOOKUP
=XLOOKUP(B3,B7:B18,C7:D18)
www.eexcel.co.uk 10
XLOOKUP
CASE-SENSITIVE FORMULA
A<>a
In Excel, the general formulas are typically not case-sensitive.
However, if you encounter a situation where case sensitivity
matters, fear not! The EXACT function is here to save the day.
#1 create an EXACT formula that compares two arguments and
returns TRUE if they are the same, and FALSE if they are not.
EXACT(B2,$B$5:$B$16)
An array formula returns a series of TRUE or FALSE
={FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;TRUE;
FALSE;FALSE}
#2 you can input this formula as the 2nd argument and use
TRUE as the 1st argument.
=XLOOKUP(TRUE,EXACT(B2,$B$5:$B$16),$C$5:$D$16)
www.eexcel.co.uk 11
XLOOKUP
WILDCARD
?*~
Find the last Name 1st from the bottom, starting with the letter
K and return Name, Surname and Age. If not found, return “Not
Found”
=XLOOKUP("K*",B6:B16,B5:D16,"Not Found",2,-1)
www.eexcel.co.uk 12
XLOOKUP
Arguments:
1. The asterisk (*) represents any numbers of characters after
letter "K" in this case. Operator (?) represents single
character.
2. The range B5:B16 represents the search range where the
formula will look for the search text.
3. The range B5:D16 represents the range of fields from which
the formula will retrieve the corresponding values.
4. The "Not Found" text will be displayed if no match is found.
5. The number 2 sets the match mode to allow the use of
wildcards.
6. The number -1 specifies that the formula should retrieve
the last match.
The results spill to other cells:
Kristine Garcia 30
www.eexcel.co.uk 13
XLOOKUP
PRO TIPS
www.eexcel.co.uk 14
XLOOKUP
CONTACT DETAILS:
YouTube Channel
www.eexcel.co.uk 15