Max Date

jswillis07

New Member
Joined
Nov 17, 2014
Messages
38
I have two worksheets that I am using. Sheet A contains raw data including a key number and a corresponding date. Sheet B just contains a key number. I am trying to find the latest date in a set of values if the key number from Sheet B matches the key # from Sheet A.
Example:
Sheet A Sheet B
Key # Date Key # Latest Date
1 11/10 1 11/12
1 11/11 2 12/1
1 11/12 3 12/4
2 12/1
3 12/3
3 12/4

I have tried using a combination of max vlookups however vlookup merely returns the first date value and doesn’t allow the max to be found.

I would greatly appreciate any assistance.

Thank you
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Are the key numbers sorted in ascending order in Sheet A ?

If so, try
=LOOKUP(A2,'Sheet A'!A$2:B$7)
 
Upvote 0
Hi,

Welcome to the forum,

Enter following array formula by pressing Ctrl+Shift+Enter


=MAX(IF(Sheet1!A$2:A$32=Sheet2!A2,Sheet1!B2:B32))
 
Upvote 0
Jonmo1: My example was a little misleading. My actual data is not in ascending order.
Fowmy: The formula makes sense and seems as if it would work, however I am still not getting the correct date. I will continue to play around with it.

I thank both of you for your help.
 
Upvote 0
Fowmy's formula should work fine.
You would need to lock the Row#s on both ranges though if you're filling it down..

=MAX(IF(Sheet1!A$2:A$32=Sheet2!A2,Sheet1!B$2:B$32))

Also, Make sure you're entering the formula with CTRL + SHIFT + ENTER
When entered correctly it will be enclosed in {brackets}
 
Upvote 0
It will be helpful if you could share with us the date you got and the implemented formula, also show a screenshot of your data from sheet A.

Make sure you replaced the correct sheet names in the formula.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

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