cka123
cka123

Reputation: 33

How to find the most recent date within a group

I have a table with a list of sales of items by customer and date, as below.

enter image description here

I would like to write some function(s) to find the most recent date of sales number by each item and customer, without using a pivot table.

My expected output is:

enter image description here

Any tip/suggestion is appreciated.

Upvotes: 1

Views: 1897

Answers (1)

bosco_yip
bosco_yip

Reputation: 3802

In H2, formula copied right to I2, and all copied down:

=LOOKUP(9^9,C$2:C$11/($A$2:$A$11=$F2)/($B$2:$B$11=$G2))

enter image description here

Edit :

Since the Lookup formula will return the last date match, column C (date) should be sorted in ascending order.

Upvotes: 3

Related Questions