Xlookup min and max
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Xlookup min and max

3 Posts
3 Users
0 Reactions
92 Views
Posts: 1103
Free Member
Topic starter
 

I'm trying to get a formula that returns two sets of oldest and newest dates from one column of a table which has dates in col A and category in col B.

So category A oldest and newest, category B oldest and newest.

I've been trying (with named ranges 'date' and 'category'):
=Xlookup(min(date),(category=B2)*date,date,,-1)

The above seems to work when using 'max' but it's not working for finding one of the 'min' dates.

Any suggestions?

Thanks


 
Posted : 31/03/2022 11:20 am
Posts: 1294
Free Member
 

Try MINIFS and MAXIFS.

=MINIFS(date column, category column, category)


 
Posted : 31/03/2022 11:36 am
Posts: 1318
Full Member
 

or small(,1), large(,1) - to get the smallest, largest value in a range and use that in your lookup?


 
Posted : 31/03/2022 12:01 pm
Posts: 1103
Free Member
Topic starter
 

Thanks both 👍


 
Posted : 31/03/2022 3:05 pm

6 DAYS LEFT
We are currently at 95% of our target!