How to return max date using XLookup

deacon10

Board Regular
Joined
Aug 9, 2010
Messages
59
Office Version
  1. 365
Hi all,

I am trying to use an Xlookup to return the max date from column C (sheet2) where there is a matching value in column A (sheet1) against column B (sheet2). This is the formula for my two failed attempts below.

=IFERROR(XLOOKUP(MAX(A1),Sheet2!B:B,Sheet2!C:C,""),"")
Answer returned = 19/01/22

=IFERROR(XLOOKUP(A1,Sheet2!B:B,MAX(Sheet2!C:C),""),"")
Answer returned = blank

Sheet1
A1 = 123456

Sheet2
B1 = 123456
B2 = 123456
C1 = 19/01/22
C2 = 23/05/22

As always, I will be super grateful for any help from my favorite community,

JD
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Use the MAXIFS function, i.e.
Excel Formula:
=MAXIFS(Sheet2!C:C,Sheet2!B:B,A1)
 
Upvote 0
Try this:
Excel Formula:
=LET(x,MAXIFS(Sheet12!C:C,Sheet12!B:B,Sheet11!A1),IF(x=0,"",x))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

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