# Find the last entry for a name

#### robertdseals

##### Active Member
Hello,
I am using Excel 2003. I have data that has a persons name in column C and a date in Column A. Is there a way to find the last date for a person?

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
try;

=MAX(IF(C1:C100="PersonX",A1:A100))

Since you are using excel 2003 it is important that you do not use whole columns (e.g. A:A)...

Worked perfectly! Thanks!

What you are looking for is an ARRAY formula as follows:

=IF(MAX((\$B\$1:\$B\$6="John")*(\$A\$1:\$A\$6))=0,"",MAX((\$B\$1:\$B\$6="John")*(\$A\$1:\$A\$6)))

You can substitute a cell reference for the name "John" in the formula. To enter an array formula you need to press CTL SHFT & Enter simultaneously.

Darn! Thought Jon's idea would work, but now I can't get it to.

Nope Crystalizer, I got a #Value! error.

It's an "array formula" - you need to confirm with CTRL+SHIFT+ENTER so that curly braces appear around the formula in the formula bar.

Jon's version should be sufficient - you can avoid odd dates displayed when there are no matches for the name by formatting the result cell like this

d/m/yyyy;;

I did. It had the brackets {}. Here is the actual data I'm working with. Maybe that will change something.

Column D = SSN. So, for instance, D2 = 123-45-6789
Column B = Date. B2 = 10/23/2011

SSN 123-45-6789 might have several dates associated with it. I want to get the last date it is associated with.

Using Jon's method, it finds the max SSN and compares it to the SSN I choose.

Eureka (or however you spell it)! I think a pivot table using Max for the date might work.

The same setup should still work, with a specific SSN in F2 this formula in G2 should give the latest date for that SSN

=MAX(IF(D\$2:D\$100=F2,B\$2:B\$100))

Replies
4
Views
95
Replies
9
Views
216
Replies
1
Views
149
Replies
16
Views
226
Replies
2
Views
235

1,207,011
Messages
6,076,139
Members
446,187
Latest member
LMill

### 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.

### Which adblocker are you using?

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

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