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:

[TABLE="width: 215"]
<colgroup><col span="2" style="text-align: center;"><col style="text-align: center;"></colgroup><tbody>[TR]
[TD="align: center"]Proj #[/TD]
[TD="align: center"]Date[/TD]
[TD="align: center"]Latest Date[/TD]
[/TR]
[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]4/1/2017[/TD]
[TD="align: center"]6/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]B[/TD]
[TD="align: center"]5/1/2017[/TD]
[TD="align: center"]7/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]C[/TD]
[TD="align: center"]6/1/2017[/TD]
[TD="align: center"]8/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]5/2/2017[/TD]
[TD="align: center"]6/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]B[/TD]
[TD="align: center"]6/2/2017[/TD]
[TD="align: center"]7/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]C[/TD]
[TD="align: center"]7/2/2017[/TD]
[TD="align: center"]8/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]6/3/2017[/TD]
[TD="align: center"]6/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]B[/TD]
[TD="align: center"]7/3/2017[/TD]
[TD="align: center"]7/3/2017[/TD]
[/TR]
[TR]
[TD="align: center"]C[/TD]
[TD="align: center"]8/3/2017[/TD]
[TD="align: center"]8/3/2017[/TD]
[/TR]
</tbody>[/TABLE]

Thanks in advance.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
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
Proj #Date
A
B
C
A
B
C
A
B
C

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]Latest Date[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]4/01/2017[/TD]
[TD="align: right"]6/03/2017[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]5/01/2017[/TD]
[TD="align: right"]7/03/2017[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]6/01/2017[/TD]
[TD="align: right"]8/03/2017[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]5/02/2017[/TD]
[TD="align: right"]6/03/2017[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]6/02/2017[/TD]
[TD="align: right"]7/03/2017[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]7/02/2017[/TD]
[TD="align: right"]8/03/2017[/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]6/03/2017[/TD]
[TD="align: right"]6/03/2017[/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]7/03/2017[/TD]
[TD="align: right"]7/03/2017[/TD]

[TD="align: center"]10[/TD]

[TD="align: right"]8/03/2017[/TD]
[TD="align: right"]8/03/2017[/TD]

</tbody>
Latest Date

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=AGGREGATE(14,6,B$2:B$10/(A$2:A$10=A2),1)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
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,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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