MAX Date Value based on Unique ID#

natetheblade2

New Member
Joined
Apr 20, 2016
Messages
4
I am having a problem coming up with a MAX function that will return the last date in a sequence.

I have tried the =MAX(IF($A$n:$A$n=An,$B$n:$B$n)) function, although it returns the MAX date in the entire list rather than just the highest number date for the given unique ID number.

For example, here is what I would like:
ID#YearMAX Year
1234520112012
1234520122012
2345620162016
3456720102012
3456720122012
4567820132013
5678920142014

<tbody>
</tbody>

What I get with the previous formula is 2016 for the MAX Year, rather than 2012 for those ID#'s that repeat.

Any idea of how to make Max Year return that max year for the ID number?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Excel 2010
ABC
1ID#YearMAX Year
21234520112012
31234520122012
42345620162016
53456720102012
63456720122012
74567820132013
85678920142014
5d
Cell Formulas
RangeFormula
C2{=MAX(IF($A$2:$A$8=A2,$B$2:$B$8))}
Press CTRL+SHIFT+ENTER to enter array formulas.


Ensure that you array enter the formula
 
Upvote 0
Excel 2010
ABC
1ID#YearMAX Year
21234520112012
31234520122012
42345620162016
53456720102012
63456720122012
74567820132013
85678920142014

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
5d

Array Formulas
CellFormula
C2{=MAX(IF($A$2:$A$8=A2,$B$2:$B$8))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Ensure that you array enter the formula

Ha! I thought I did that. Thanks. That worked... rookie mistake!
 
Upvote 0
You dont need ctrl+shift+enter for this.


Unknown
ABC
1ID#YearMAX Year
2123452011 
31234520122012
42345620162016
5345672010
63456720122012
74567820132013
85678920142014
9
Sheet7
Cell Formulas
RangeFormula
C2=IF(A2&B2=A2&MAX(INDEX(--($A$2:$A$8=A2)*($B$2:$B$8),0)),MAX(INDEX(--($A$2:$A$8=A2)*($B$2:$B$8),0)),"")
 
Upvote 0
This will work without ctrl+shift+enter.


Unknown
ABC
1ID#YearMAX Year
21234520112012
31234520122012
42345620162016
53456720102012
63456720122012
74567820132013
85678920142014
9
Sheet7
Cell Formulas
RangeFormula
C2=MAX(INDEX(--($A$2:$A$8=A2)*($B$2:$B$8),0))
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,679
Members
449,463
Latest member
Jojomen56

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