formulas to count dates

B

Brian

I have input the following dates into cells A1,B1,C1,D1 respectively...March
30, 2009, August 20, 2009, July 30, 2008, November 20, 2008. Cell Z1 is
todays date =TODAY() which is August 27.
I would like three formulas as follows:
1) Cell e1 that will count the number of days following the most recent date
of the 4 cells above, in this example the result is "7".
2) Cell f1 that will show a date that is 3 days after the most recent date
of the 4 cells, in this example the result is August 30/09.
3) Cell g1 that will count days based on two criteria: if all of the 4 cells
(a1-d1) are dates in the past, then g1 will add 30 days to the most recent
date and count the number of days from today to that date or if one of the
dates in the 4 cells is a date in the future, then the value in g1 is simply
the number of days from today to that date, in this example the result is
"23".

Thanks very much for your help with this.
 
R

Rick Rothstein

I think these are what you want...

1) =TODAY()-MAX(A1:D1)

2) =MAX(A1:D1)+3

3) =IF(MAX(A1:D1)<TODAY(),TODAY()-MAX(A1:D1),MAX(A1:D1)+30-TODAY())

Note: Number 1) above assumes all the dates are in the past. If not, you
will need something like this...

=IF(MAX(A1:D1)<TODAY(),TODAY()-MAX(A1:D1),"???")

where you would put whatever you want in place of the ??? to signal the
maximum date is a later date than today.
 
S

Shane Devenshire

Hi,

For the first one use

=Z1-MAX(A1:D1)

For the second one I note that your desired answer 8/30/09 doesn't follow
from your stated question?

If you want 3 days after TODAY then that would be 8/30/09 but 3 days after
the dates you have given us would be 8/23/09?

If you want the first of these =Z1+3
If you want the second of these =3+MAX(A1:D1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top