Count of days

A

Albert

Can someone tell me how to correct the formula to count
the days across a year?

This formula is returning 25 days, which is wrong.

=DATEDIF(I5,D5,"yd") & " day" & IF(DATEDIF(I5,D5,"yd")
<>1,"s","")
D5 contains =TODAY()
I5 contains =MAX(('Export'!D3:D9999<TODAY())*('Export'!
D3:D9999)) (array entered) and is 2/5/2004 Feb.5, 2004.


It was accurate once but I do not know what is wrong! Is
it the year change?

TIA
 
B

Biff

Ooops!

I see I used the wrong year! Sorry.

Biff
-----Original Message-----
Hi!

When I do this:

=TODAY()-"2/5/2005"

I get 25.


What result are you expecting?

Biff

.
 
B

Biff

HI!

Why not just use this:

=D5-I5&" day"&IF(D5-I5<>1,"s","")

returns: 391 days

Biff
 
M

Myrna Larson

The "yd" option means to return the number of days since the last anniversary
date. The starting date is 2/5/2004. The anniversary date is thus 2/5/2005. So
you are calculating the number of days from 2/5/2005 to the current date.

If you want the total number of days, you can just subtract the 2 dates, or
use the "d" option with DATEDIF, i.e.

=DATEDIF(I5,D5,"d")&" day"&IF(DATEDIF(I5,D5,"d")<>1,"s","")

=D5-I5&" day"&IF(D5-I5>1,"s","")
 

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