Compare several dates in row and display the most recent date

Mark2455

New Member
Joined
Feb 22, 2019
Messages
2
First I am sorry if this has been asked previously but I could not find anything that helped me out.
I have a spreadsheet that is about 500 rows and part of it includes 8 columns representing the last 8 years. In some of the columns there are dates and others are blank. I want to compare all 8 cells in each of the 500 rows and then just enter the most recent date in a new cell. Some of the rows have no dates are all, some have a few dates and a few have dates in all 8 cells. It does not matter if the formula throws an error when it finds no date as the will indicate that task has never been completed in all 8 years.
I have this formula that I used to indicate when a task was last completed but it cannot look at all 8 cells in a row of course.
=DATEDIF(P2,TODAY(),"Y") & " Years, " & DATEDIF(P2,TODAY(),"YM") & " Months, " & DATEDIF(P2,TODAY(),"MD") & " Days"

This is probably a simple task for many of you but I have not been able to get anything to work.

Hope this makes sense.

Thank you,

Mark2455
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi,

Are the dates in the 8 Columns in ascending order from left to right?
And when you say "most recent date", does that mean the "latest date", or just the last Date that was entered but Not necessarily in "order"?

2 different formulas depending on your situation:


Book1
ABCDEFGHIJK
21/15/20123/15/20144/15/20138/15/20187/1/20163/1/201511/20/20176/30/20158/15/20186/30/2015
3
48/20/20171/31/201912/31/20181/31/201912/31/2018
Sheet599
Cell Formulas
RangeFormula
J2=IF(MAX(A2:H2)=0,"",MAX(A2:H2))
K2=IFERROR(LOOKUP(9.99999999999999E+307,A2:H2),"")
 
Last edited:
Upvote 0
You nailed it with your first formula. =IF(MAX(A2:H2)=0,"",MAX(A2:H2))
Thanks so much for your help.
The columns are descending in order with A=2019, B=2018 and so on and the most recent date is the latest date as you suggested.

Regards,
Mark2455
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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