pladder
pladder

Reputation: 142

Find Max of Each Value in table

I have a table of ID values with multiple entries for different dates, How would i go about finding the max date for each ID? Preferably having the answer in a dynamic array as my table of values changes depending on which data the using is parsing

cheers

enter image description here

Upvotes: 0

Views: 98

Answers (1)

EDS
EDS

Reputation: 2195

You mentioned you wanted it in a dynamic array, so I suggest using UNIQUE and MAXIFS inside a LET and combining the results with the use of SEQUENCE.

Something like:

=LET(x, UNIQUE(A:A),
mycols, SEQUENCE(1,2),
IF(mycols=1, x,
MAXIFS(B:B, A:A, x)))

For example: enter image description here

EDIT (a much nicer solution provided by @JvdV): =CHOOSE({1,2},UNIQUE(A:A),MAXIFS(B:B,A:A,UNIQUE(A:A)))

Upvotes: 2

Related Questions