Forum Discussion
joel70
Mar 10, 2022Copper Contributor
Xlookup - next current date
Hi Guys, I am looking for how to pull in the next most recent date with an Xlookup. I have 2 columns, 1 with project numbers and then another column with the date. How can I get Xlookup to b...
- Mar 11, 2022
=INDEX($B$1:$B$24,LARGE(IF($A$1:$A$24=D2,ROW($1:$24)),IF(SUMPRODUCT(N($A$1:$A$24=D2))>1,2,1)))
An alternative could be above formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021.
Patrick2788
Mar 11, 2022Silver Contributor
You'll want to use FILTER instead of XLOOKUP. The COUNTIF will prevent errors if there are not 2+ occurrences of a given Project#.