How to use Xlookup | Xlookup Tutorial | Excel Tutorial
Step 1: Understand the Existing Data
The video starts with a dataset where Double XLOOKUP is being used.
The data contains three important fields:
For example, when the product HDD is selected and the month is April, Excel automatically shows the corresponding total.
When the month is changed to February, the record changes according to the selected month.
Key idea: The result depends on two conditions — Product + Month.
Step 2: Create a New Sheet
Step 3: Prepare the Headers
Create the following headers:
Products
Months
Total Sum
To duplicate the formatting/data downwards, use:
Ctrl + D
This fills the selected cells downward.
The same formatting can be duplicated using Ctrl + D.
Data → Data Validation
Inside Data Validation:
Under Allow, select List.
Go to the Source field.
Select the product range from the Products list.
Click OK.
Now the Product cell will have a dropdown containing the available products.
Data Validation → List → Source = Products
This allows the user to select a product instead of manually typing it.
How much is the total for HDD in May?
This means Excel needs to perform a lookup using two criteria:
Month = May
This is where the Double XLOOKUP technique is used.
=XLOOKUP(
First Lookup Value
The first lookup value is the selected Month. So: =XLOOKUP(Month,
So conceptually:
Paste the data using Ctrl + V.
You can adjust the alignment and formatting according to your requirement.
Now select the required cells and format them.
Select the complete header area.
Set the alignment to Left.
Apply a Yellow fill color.
Go to Borders.
Select All Borders.
This makes the table easier to read.
Now we need to create a dropdown list for the Product.
Important
Now the objective is to find the total value based on both Product and Month.
Product = HDD
The Month
The Product
The formula starts with:
After the first comma, Excel asks for the lookup_array.
Product = HDD
Month = May
The formula returns the corresponding total.
In the example shown in the video, the result is:
476
So Excel finds the record where the required product and month match and returns the corresponding total.
Products
Months
Total Sum
To duplicate the formatting/data downwards, use:
Ctrl + D
This fills the selected cells downward.
Step 4: Format the Table
Then:The same formatting can be duplicated using Ctrl + D.
Step 5: Create a Product Dropdown
Go to:Data → Data Validation
Inside Data Validation:
Under Allow, select List.
Go to the Source field.
Select the product range from the Products list.
Click OK.
Now the Product cell will have a dropdown containing the available products.
Data Validation → List → Source = Products
This allows the user to select a product instead of manually typing it.
Step 6: Create a Month Dropdown
Now repeat the same process for Month. Go to: Data → Data Validation Then: Select List under Allow. Go to Source. Select the Months range. Click OK. Now you have a second dropdown for selecting the month. So your input section now has:
| InputPurpose | |
|---|---|
| Product | Select the product |
| Month | Select the month |
| Total Sum | Display the result |
Step 7: Understand the Requirement
For example:How much is the total for HDD in May?
This means Excel needs to perform a lookup using two criteria:
Month = May
This is where the Double XLOOKUP technique is used.
Step 8: Start the XLOOKUP Formula
The basic structure is: =XLOOKUP(lookup_value, lookup_array, return_array) But here we need two XLOOKUPs, because we are looking up:=XLOOKUP(
First Lookup Value
The first lookup value is the selected Month. So: =XLOOKUP(Month,
Step 9: Select the Month Lookup Array
Here, select the Month column from the original data.So conceptually:
=XLOOKUP(Month, Month_R_
Product
Month
Total Sum
A Pivot Table/List has already been created using this data.
Product
Month
Total Sum
A Pivot Table/List has already been created using this data.
Select the data.
Press Ctrl + C.
Go to a new sheet.
Press Ctrl + C.
Go to a new sheet.
Paste the data using Ctrl + V.
You can adjust the alignment and formatting according to your requirement.
Now select the required cells and format them.
Select the complete header area.
Set the alignment to Left.
Apply a Yellow fill color.
Go to Borders.
Select All Borders.
This makes the table easier to read.
Now we need to create a dropdown list for the Product.
Important
Now the objective is to find the total value based on both Product and Month.
Product = HDD
The Month
The Product
The formula starts with:
After the first comma, Excel asks for the lookup_array.
Step 10: Use the Second XLOOKUP
Now the second XLOOKUP is used to find the selected Product. The structure becomes: XLOOKUP(Product, Product_Range, ...) So the overall concept is: =XLOOKUP(Month, Month_Range, XLOOKUP (Product, Product_Range, Return_Range)) This is called a nested XLOOKUP or Double XLOOKUP.Step 11: Select the Product Lookup Value
For the second XLOOKUP, the lookup_value is the selected Product. For example:HDD Excel searches for this product in the Product column.Step 12: Select the Product Lookup Array
Now select the complete Product column/range. Conceptually: XLOOKUP(HDD, Product_Range, Return_Range) Excel will search for HDD in the Product range.Step 13: Select the Return Array
The final requirement is the Return Array. We want the value corresponding to the selected: Product + Month Therefore, the Total Sum data is returned. The final conceptual formula is: =XLOOKUP(Month, Month_Range, XLOOKUP (Product, Product_Range, Total_Sum_Range)) Then close the brackets and press: EnterStep 14: Check the Result
Suppose the selected values are:Product = HDD
Month = May
The formula returns the corresponding total.
In the example shown in the video, the result is:
476
So Excel finds the record where the required product and month match and returns the corresponding total.
How Double XLOOKUP Works
Think of it like this: First XLOOKUP:
➡️ Find the required Month Second XLOOKUP:
➡️ Find the required Product Return:
➡️ Give the corresponding Total Sum Simple
Flow Product Selection
↓
Month Selection
↓
Double XLOOKUP
↓
Matching Product + Month
↓
Total Sum