Forum Discussion
Nick_Orem
Jan 19, 2023Copper Contributor
Last product purchased
I have a file of customers and products they have purchased with the date for each purchase. Some customers have many purchases, some have only one. I want to create a new file that shows only the ...
mathetes
Jan 20, 2023Gold Contributor
See attached. You'll need a very recent version of Excel for these functions to work. There are two formulas.
=UNIQUE(B2:B21) produces a list of unique customer names
then
=FILTER($D$2:$D$21,
($B$2:$B$21=H3)*($A$2:$A$21=MAX(FILTER($A$2:$A$21,B$2:$B$21=H3))))
gets the most recent (MAX) order date & time and then matches that against products ordered by that customer.