Max date value based on project

tdn2937

New Member
Joined
Sep 27, 2017
Messages
1
I'm trying to find a formula that would return the latest date for each project. For example, here is what I would like to get:

Proj #DateLatest Date
A4/1/20176/3/2017
B5/1/20177/3/2017
C6/1/20178/3/2017
A5/2/20176/3/2017
B6/2/20177/3/2017
C7/2/20178/3/2017
A6/3/20176/3/2017
B7/3/20177/3/2017
C8/3/20178/3/2017

<colgroup><col span="2" style="text-align: center;"><col style="text-align: center;"></colgroup><tbody>
</tbody>

Thanks in advance.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Welcome to the MrExcel board!

Try this, copied down.


Book1
ABC
1Proj #DateLatest Date
2A4/01/20176/03/2017
3B5/01/20177/03/2017
4C6/01/20178/03/2017
5A5/02/20176/03/2017
6B6/02/20177/03/2017
7C7/02/20178/03/2017
8A6/03/20176/03/2017
9B7/03/20177/03/2017
10C8/03/20178/03/2017
Latest Date
Cell Formulas
RangeFormula
C2=AGGREGATE(14,6,B$2:B$10/(A$2:A$10=A2),1)
 
Upvote 0
You can also use the following array formula in cell C2:
=MAX(IF(A:A=A2,B:B,0))
ctrl+shft+enter

Welcome to the MrExcel board!

Try this, copied down.

ABC
1Proj #DateLatest Date
2A4/01/20176/03/2017
3B5/01/20177/03/2017
4C6/01/20178/03/2017
5A5/02/20176/03/2017
6B6/02/20177/03/2017
7C7/02/20178/03/2017
8A6/03/20176/03/2017
9B7/03/20177/03/2017
10C8/03/20178/03/2017

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Latest Date

Worksheet Formulas
CellFormula
C2=AGGREGATE(14,6,B$2:B$10/(A$2:A$10=A2),1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
You can also use the following array formula in cell C2:
=MAX(IF(A:A=A2,B:B,0))
ctrl+shft+enter
You certainly could, but I would highly recommend still restricting the row range. For example
=MAX(IF(A$2:A$10=A2,B$2:B$10,0))

Without that, even with this small sample of 9 rows of data on my machine this formula and the one from post #2 takes about 0.003 seconds to re-calculate but using the whole column references takes over 1 second - approx 300x slower.
 
Upvote 0
Also, if your system includes the MAXIFS function, in C2 enter and copy down:

=MAXIFS($B$2:$B$10,$A$2:$A$10,$A2)
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,947
Members
449,480
Latest member
yesitisasport

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