XLOOKUP with multiple criteria across multiple columns and rows

soriaul

New Member
Joined
Apr 30, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm trying to see if there is an xlookup formula or any formula that will help, that will bring back a total that has criteria across columns and a row. This is what I tried previously and it's not working and bringing back a value error.

XLOOKUP(B9,Assumptions!$B$3:$B$152,XLOOKUP(D$6,Assumptions!$C$2:$N$2,XLOOKUP(Cashflow!$D$2,Assumptions!$A$3:$A$152,Assumptions!C$3:C$152,0)))

Below in the "Sales" row is where I want the values returned based on the criteria in red font
1
Financial Statements
$ Thousands
1​
2​
3​
4​
5​
6​
7​
8​
9​
10​
11​
12​
2024​
AprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMarch
INCOME STATEMENT
SalesSales Proceeds#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!

This is the table where the data is coming from.
Project #TypeAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMarch
1​
Sales--------2.11---
2​
Sales-----------1.48
3​
Sales--1.35---------
4​
Sales-----2.36------
5​
Sales--------1.80---
6​
Sales----------1.90-
7​
Sales--------3.14---
8​
Sales--3.36---------
9​
Sales-------2.76----
10​
Sales------2.98-----
11​
Sales--------1.96---
12​
Sales-----1.93------
13​
Sales----2.02-------
14​
Sales--2.84---------
15​
Sales---------3.77--
16​
Sales------3.59-----
17​
Sales-----------2.85
18​
Sales--2.62---------
19​
Sales-----1.54------
20​
Sales-------4.27----
21​
Sales---3.37--------
22​
Sales-----3.33------
23​
Sales-----------2.25
24​
Sales-------3.08----
25​
Sales--1.69---------
26​
Sales-----1.06------
27​
Sales-----2.83------
28​
Sales------2.09-----
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Like this?
Drag formula in C7 across columns as needed.

Book1
ABCDEFGHIJKLMN
1Financial Statements
2$ Thousands123456789101112
32024
4AprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMarch
5
6INCOME STATEMENT
7SalesSales Proceeds0011.863.372.0213.058.6610.119.013.771.96.58
8
9This is the table where the data is coming from.
10Project #TypeAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMarch
111Sales--------2.11---
122Sales-----------1.48
133Sales--1.35---------
144Sales-----2.36------
155Sales--------1.8---
166Sales----------1.9-
177Sales--------3.14---
188Sales--3.36---------
199Sales-------2.76----
2010Sales------2.98-----
2111Sales--------1.96---
2212Sales-----1.93------
2313Sales----2.02-------
2414Sales--2.84---------
2515Sales---------3.77--
2616Sales------3.59-----
2717Sales-----------2.85
2818Sales--2.62---------
2919Sales-----1.54------
3020Sales-------4.27----
3121Sales---3.37--------
3222Sales-----3.33------
3323Sales-----------2.25
3424Sales-------3.08----
3525Sales--1.69---------
3626Sales-----1.06------
3727Sales-----2.83------
3828Sales------2.09-----
Sheet1
Cell Formulas
RangeFormula
C7:N7C7=SUM(FILTER($C$11:$N$38,C4=$C$10:$N$10,0))
 
Upvote 0
Unfortunately, your question is hard to piece together because there aren't any column/row headers, and judging from the dataset, you don't start in A1.

Because of this, I am just using the below named/ dynamic ranges (which would be good to do anyway):

Table is converted into a dynamic table named ProjectTable
Red 1 in your first screenshot is named ProjectNum
Red Sales in your first screenshot is named Type
Red Month is named Month

Excel Formula:
=INDEX(ProjectTable,XMATCH(1,(ProjectTable[Project '#]=ProjectNum)*(ProjectTable[Type]=Type)),XMATCH(Month,ProjectTable[#Headers]))
 
Last edited:
Upvote 1
Solution
Thanks this is closer but I also need to add in the filter by project #
 
Upvote 0
This wouldn't filter based on Project Number or Type, although could be modified to do it.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top