#1   Report Post  
Albert
 
Posts: n/a
Default Count of days

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
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

When I do this:

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

I get 25.

This formula is returning 25 days, which is wrong.


What result are you expecting?

Biff

-----Original Message-----
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
.

  #3   Report Post  
Biff
 
Posts: n/a
Default

Ooops!

I see I used the wrong year! Sorry.

Biff

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

When I do this:

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

I get 25.

This formula is returning 25 days, which is wrong.


What result are you expecting?

Biff

-----Original Message-----
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
.

.

  #4   Report Post  
Biff
 
Posts: n/a
Default

HI!

Why not just use this:

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

returns: 391 days

Biff

-----Original Message-----
Ooops!

I see I used the wrong year! Sorry.

Biff

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

When I do this:

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

I get 25.

This formula is returning 25 days, which is wrong.


What result are you expecting?

Biff

-----Original Message-----
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
.

.

.

  #5   Report Post  
Albert
 
Posts: n/a
Default

Thanks Biff, I never looked beyond the workbook I
inherited.
Works great now!
-----Original Message-----
HI!

Why not just use this:

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

returns: 391 days

Biff

-----Original Message-----
Ooops!

I see I used the wrong year! Sorry.

Biff

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

When I do this:

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

I get 25.

This formula is returning 25 days, which is wrong.

What result are you expecting?

Biff

-----Original Message-----
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
.

.

.

.



  #6   Report Post  
Myrna Larson
 
Posts: n/a
Default

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-I51,"s","")



On Wed, 2 Mar 2005 11:22:12 -0800, "Albert"
wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count for present & absent days Ajit Munj Excel Discussion (Misc queries) 6 March 24th 05 01:21 PM
Is there a WorkDay() type function that count all days except tho. Dark Skunk Excel Worksheet Functions 8 February 15th 05 08:37 PM
Count number of days in given month? Bryan Excel Worksheet Functions 10 February 2nd 05 11:44 PM
Count Days excluding Sundays KENNY Excel Worksheet Functions 3 November 11th 04 05:26 PM
how do I make a function to count days? khamsta Excel Worksheet Functions 2 November 1st 04 10:53 PM


All times are GMT +1. The time now is 02:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"