Find the Max Date where...

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,341
Office Version
  1. 365
Platform
  1. Windows
If I had a Table with two columns, the fist column is Letters (A,B,D,D,F,D,E,F,G,H...) and the second is a date for each of these.

Note There could be different dates where there is duplicates (the First F:1/1/2016 the second F:1/5/2016 and so on)

Is there a way to find the Max date for a letter? If I select F, I want the result to be 1/5/2016

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Aggregate (Totals) Query.

Simply add your two field to a new query.
Then click on the Totals button (looks like a Sigma). This will add a Totals row under each field in the query with the words "Group By" under each one.
Change the "Group By" option under the Date field to Max.
View your results.

This will return the Max date value for each Grouping (and you are just Grouping by your letter column).

Aggregate queries are very useful, so it is a good tool to learn. There are lots of different aggregate functions, MIN, MAX, SUM, AVG, FIRST, LAST, etc.
They can also be used to eliminate duplicates form being returned in a query.
 
Upvote 0
Thanks. That's a great help. Very much appreciated!
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,917
Members
449,093
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top