chee hiong Yeo
chee hiong Yeo

Reputation: 11

Google sheets query unique values by latest date and ignore others

As the title suggests, I am trying to query unique row values from a non-distinct identifier (date). What I have so far is using the following:

=unique(filter(A:C,match(A:A&C:C,query(query(A:C,"select A,max(C) where A<>'' group by A label max(C) ''"),"select Col1")&query(query(A:C,"select A,max(C) where A<>'' group by A label max(C) ''"),"select Col2"),0)))

But the returned results does not work specifically as date entries could be non-distinct for example:

I need to (1) if returned row has numerical results -> ignore undisclosed (2) for all returned rows with identical dates to return only the highest value (eg. if the returned is undisclosed, 10 and 20, the result should only show 20.

enter image description here

Upvotes: 1

Views: 1141

Answers (1)

player0
player0

Reputation: 1

try:

=SORTN(SORT(A:C, 3, 0), 99^99, 2, 1, 1)

0

Upvotes: 1

Related Questions