Xlookup with Multiple Criteria

acool

Board Regular
Joined
Feb 10, 2023
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I am currently trying to create an excel formula that uses an Xlookup to provide values based on multiple criteria. I am currently trying to create an xlookup based on the criteria in column A and the Edate value in Row 1. I would like to match these up against Columns T and Columns V (Using Edate in Column V) to provide the corresponding value in Column X. I am currently trying to use the formula: =XLOOKUP(1,($A7=$T$2:$T$11)*(EDATE(B$1,0)=EDATE($V$2:$V$11,0)),$X$2:$X$11,0,0), however this is not providing me with the correct value. For example, I would like my value in B6 to equal 100, B7 to equal 200, etc. If there is no corresponding value, I would like my cells to equal 0. Any help would be greatly appreciated. Thank You!
1715291077139.png
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try in B6 only:
Excel Formula:
=IFERROR(INDEX(X2:X11,MATCH(A6:A15&MONTH(B1:M1)&YEAR(B1:M1),T2:T11 & MONTH(V2:V11) & YEAR(V2:V11),0)),"")

XLOOKUP option
Excel Formula:
=XLOOKUP(B6&MONTH($B$1:$M$1)&YEAR($B$1:$M$1),$T$2:$T11&MONTH($V$2:$V$11)&YEAR($V$2:$V$11),$X$2:$X$11,"")
 
Last edited:
Upvote 0
Solution
Try in B6 only:
Excel Formula:
=IFERROR(INDEX(X2:X11,MATCH(A6:A15&MONTH(B1:M1)&YEAR(B1:M1),T2:T11 & MONTH(V2:V11) & YEAR(V2:V11),0)),"")

XLOOKUP option
Excel Formula:
=XLOOKUP(B6&MONTH($B$1:$M$1)&YEAR($B$1:$M$1),$T$2:$T11&MONTH($V$2:$V$11)&YEAR($V$2:$V$11),$X$2:$X$11,"")
The xlookup option worked! Thank You!
 
Upvote 0
@Cubist if you don't mind me asking on other question...I am struggling with an additional aspect of this. I am also trying to match the value in column A and the dates in Row B:M to the corresponding value in column AB. However, I would like to carry this number out for the remainder of the months, as opposed to one single month. For example, for Cell E6 I would like the value to be $417 and have this carry out for the remainder of the months, Cell E7 to be $833 and carry out the rest of the months etc. Is there any way to work that into the formula that you created above. Thank you again for all of your help! Very much appreciated.
1715307729246.png
 
Upvote 0
Do you mean like this? To make things a little easier. Have your header row 3 end of the month and column AB at the end of the month.
Book2
ABCDEFGHIJKLMNUAAAB
1
23/31/24
33/31/244/30/245/31/246/30/247/31/248/31/249/30/2410/31/2411/30/2412/31/241/31/252/28/25
4
5A4176/30/24
6A 417417417417417417417417417B8336/30/24
7B 833833833833833833833833833C12507/31/24
8C 12501250125012501250125012501250D16678/31/24
9D 1667166716671667166716671667E20839/30/24
10E 208320832083208320832083F250010/31/24
11F 25002500250025002500G291711/30/24
12G 2917291729172917H333312/31/24
13H 333333333333I37501/31/25
14I 37503750J41673/31/25
15J 
Sheet7
Cell Formulas
RangeFormula
B3:M3B3=EDATE(B2,SEQUENCE(1,12,0))
B6:M15B6=LET(f,FILTER($AA$5:$AB$14,$U$5:$U$14=A6),IF($B$3#>=(CHOOSECOLS(f,2)),CHOOSECOLS(f,1),""))
Dynamic array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,881
Messages
6,175,159
Members
452,615
Latest member
bogeys2birdies

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