Max Function find second newest date

mrpudley

New Member
Joined
Sep 7, 2016
Messages
8
Hello all,

I have found how to find the second newest date using the Large function. However it only works when there is only one instance of the date. I have a table with were each date is recorded three times for three different products. When I use =Large(A:A, 2) it returns the max date as the bottom three rows of the table have that.

My table looks something like this:
[TABLE="width: 200"]
<tbody>[TR]
[TD]Week[/TD]
[TD]Product[/TD]
[/TR]
[TR]
[TD]8/28/2016[/TD]
[TD]Product 1[/TD]
[/TR]
[TR]
[TD]8/28/2016[/TD]
[TD]Product 2[/TD]
[/TR]
[TR]
[TD]8/28/2016[/TD]
[TD]Product 3[/TD]
[/TR]
[TR]
[TD]9/4/2016[/TD]
[TD]Product 1[/TD]
[/TR]
[TR]
[TD]9/4/2016[/TD]
[TD]Product 2[/TD]
[/TR]
[TR]
[TD]9/4/2016[/TD]
[TD]Product 3[/TD]
[/TR]
</tbody>[/TABLE]

Any thoughts or suggestions are appreciated.

Thanks,

Brent
 
Something like:


Excel 2010
AB
1WeekProduct
28/28/2016Product 1
38/28/2016Product 2
48/28/2016Product 3
59/4/2016Product 1
69/4/2016Product 2
79/4/2016Product 3
8
98/28/2016
Sheet7
Cell Formulas
RangeFormula
B9{=LARGE(IF(FREQUENCY($A$2:$A$7,$A$2:$A$7)>0,$A$2:$A$7),2)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Something like:

Excel 2010
AB
WeekProduct
Product 1
Product 2
Product 3
Product 1
Product 2
Product 3

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]8/28/2016[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]8/28/2016[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]8/28/2016[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]9/4/2016[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]9/4/2016[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]9/4/2016[/TD]

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

[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"]8/28/2016[/TD]

</tbody>
Sheet7

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B9[/TH]
[TD="align: left"]{=LARGE(IF(FREQUENCY($A$2:$A$7,$A$2:$A$7)>0,$A$2:$A$7),2)}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]

Thanks however it returns #NUM! I tried using both the range A2:A7 and =DataTable[Week] but neither worked. (DataTable is the name of my table).

Thanks for you time, it is appreciated.
 
Upvote 0
Here's a table example:


Excel 2010
AB
1WeekProduct
28/28/2016Product 1
38/28/2016Product 2
48/28/2016Product 3
59/4/2016Product 1
69/4/2016Product 2
79/4/2016Product 3
8
98/28/2016
Sheet7
Cell Formulas
RangeFormula
B9{=LARGE(IF(FREQUENCY(Table1,Table1)>0,Table1),2)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

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