Xlookup with multiple criteria

zinah

Active Member
Joined
Nov 28, 2018
Messages
353
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have two sheets that I need to map, I used xlookup based on employee ID, but what I need is to use employee ID and payment data:

not sure why I get error 91 when I tried to copy as mini table or sheet, but here's the table and formula I used, if anyone can help with adjusting the formula to get the payment amount based Employee ID and Scheduled Payment Date PPD End row:

Payment Date is 7/31/2023 =XLOOKUP(A13,H:H,K:K)
Payment Date is 8/15/2023 = =XLOOKUP(A14,H:H,L:L)
and so on

Column HColumn JColumn KColumn LColumn MColumn NColumn OColumn PColumn Q
PPD Start
7/15/2023​
8/1/2023​
8/16/2023​
9/1/2023​
9/16/2023​
10/1/2023​
10/16/2023​
Scheduled Payment DatePPD end
7/31/2023​
8/15/2023​
8/31/2023​
9/15/2023​
9/30/2023​
10/15/2023​
10/31/2023​
Days in PPD
11​
11​
12​
11​
10​
10​
12​
Employee IDTotal days of severancePayment amountPayment amountPayment amountPayment amountPayment amountPayment amountPayment amount
12345678​
25​
0​
2,773​
4,754​
2,377​
0​
0​
0​
23456789​
36​
0​
3,531​
7,062​
6,473​
4,119​
0​
0​
23456790​
31​
0​
6,473​
7,062​
4,708​
0​
0​
0​
Employee IDScheduled Payment DateAmount
12345678​
7/31/2023​
0​
12345678​
8/15/2023​
2,773​
12345678​
8/31/2023​
4,754​
12345678​
9/15/2023​
2,377​
12345678​
9/30/2023​
0​
12345678​
10/15/2023​
12345678​
10/31/2023​
23456789​
7/31/2023​
0​
23456789​
8/15/2023​
3,531​
23456789​
8/31/2023​
23456789​
9/15/2023​
23456789​
9/30/2023​
23456789​
10/15/2023​
23456789​
10/31/2023​
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Xlookup isn't great when working with multiple criteria, especially if you are trying to find something using both rows and columns. What you should use instead is index/match/match.

Utilizing your data above, the formula would look something like =INDEX($H$3:$Q$9,MATCH(A15,H$3:H$9,0),MATCH(B15,$H$4:$Q$4,0))

Here is a great article explaining the formula in detail
 
Upvote 0
Try:
Change ranges to match your data

Book1
ABCGHIJKLMNOPQR
1Column HColumn JColumn KColumn LColumn MColumn NColumn OColumn PColumn Q
2PPD Start7/15/20238/1/20238/16/20239/1/20239/16/202310/1/202310/16/2023
3Scheduled Payment DatePPD end7/31/20238/15/20238/31/20239/15/20239/30/202310/15/202310/31/2023
4Days in PPD11111211101012
5Employee IDTotal days of severancePayment amountPayment amountPayment amountPayment amountPayment amountPayment amountPayment amount
612345678250277347542377000
723456789360353170626473411900
823456790310647370624708000
12Employee IDScheduled Payment DateAmount
13123456787/31/20230
14123456788/15/20232773
15123456788/31/20234754
16123456789/15/20232377
17123456789/30/20230
181234567810/15/20230
191234567810/31/20230
20234567897/31/20230
21234567898/15/20233531
22234567898/31/20237062
23234567899/15/20236473
24234567899/30/20234119
252345678910/15/20230
262345678910/31/20230
Sheet1
Cell Formulas
RangeFormula
C13:C26C13=INDEX($L$6:$R$8,MATCH($A13,$H$6:$H$8,0),MATCH($B13,$L$3:$R$3,0))
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,580
Members
449,174
Latest member
chandan4057

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