#1   Report Post  
skchth
 
Posts: n/a
Default count dates in excel

I am trying to count the days between 2 dates. Start date 01/01/01 and End
date 01/05/01 should return 5. However the Datediff function will return 4
because it doesn't count the start date. Adding "+1" to the Datediff function
does not work for me because when the cells with the start and end date are
empty the cell with the Datediff function must be empty.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(OR(A1="",A2=""),"",A1-A2+1)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"skchth" wrote in message
...
I am trying to count the days between 2 dates. Start date 01/01/01 and

End
date 01/05/01 should return 5. However the Datediff function will return 4
because it doesn't count the start date. Adding "+1" to the Datediff

function
does not work for me because when the cells with the start and end date

are
empty the cell with the Datediff function must be empty.



  #3   Report Post  
tjtjjtjt
 
Posts: n/a
Default

Is there a reason why COUNT won't work?

tj

"skchth" wrote:

I am trying to count the days between 2 dates. Start date 01/01/01 and End
date 01/05/01 should return 5. However the Datediff function will return 4
because it doesn't count the start date. Adding "+1" to the Datediff function
does not work for me because when the cells with the start and end date are
empty the cell with the Datediff function must be empty.

  #4   Report Post  
tjtjjtjt
 
Posts: n/a
Default

Somehow I read your post as referring to a list of dates. Perhaps I should
read what's actually there instead. Sorry about that.

tj

"tjtjjtjt" wrote:

Is there a reason why COUNT won't work?

tj

"skchth" wrote:

I am trying to count the days between 2 dates. Start date 01/01/01 and End
date 01/05/01 should return 5. However the Datediff function will return 4
because it doesn't count the start date. Adding "+1" to the Datediff function
does not work for me because when the cells with the start and end date are
empty the cell with the Datediff function must be empty.

  #5   Report Post  
CLR
 
Posts: n/a
Default

=IF(OR(A1="",B1=""),"",(B1-A1)+1)

Vaya con Dios,
Chuck, CABGx3


"skchth" wrote in message
...
I am trying to count the days between 2 dates. Start date 01/01/01 and

End
date 01/05/01 should return 5. However the Datediff function will return 4
because it doesn't count the start date. Adding "+1" to the Datediff

function
does not work for me because when the cells with the start and end date

are
empty the cell with the Datediff function must be empty.





  #6   Report Post  
skchth
 
Posts: n/a
Default



"CLR" wrote:

=IF(OR(A1="",B1=""),"",(B1-A1)+1)

Vaya con Dios,
Chuck, CABGx3


"skchth" wrote in message
...
I am trying to count the days between 2 dates. Start date 01/01/01 and

End
date 01/05/01 should return 5. However the Datediff function will return 4
because it doesn't count the start date. Adding "+1" to the Datediff

function
does not work for me because when the cells with the start and end date

are
empty the cell with the Datediff function must be empty.


Thank you all so much. It works and you probably think "Of Course".

I would have never been able to figure it out without your help.

skchth

  #7   Report Post  
CLR
 
Posts: n/a
Default

You're welcome, and thanks for the feedback. And, BTW, today one of us
helps you with something we can, and tomorrow you help someone else with
something you can.........the World gets better with each
experience..........

Vaya con Dios,
Chuck, CABGx3

"skchth" wrote in message
...


"CLR" wrote:

=IF(OR(A1="",B1=""),"",(B1-A1)+1)

Vaya con Dios,
Chuck, CABGx3


"skchth" wrote in message
...
I am trying to count the days between 2 dates. Start date 01/01/01

and
End
date 01/05/01 should return 5. However the Datediff function will

return 4
because it doesn't count the start date. Adding "+1" to the Datediff

function
does not work for me because when the cells with the start and end

date
are
empty the cell with the Datediff function must be empty.


Thank you all so much. It works and you probably think "Of Course".

I would have never been able to figure it out without your help.

skchth



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
How to link Excel worksheet tab names to dates in each worksheet? Pat Excel Worksheet Functions 9 January 31st 05 07:51 AM
dates in Excel 2003 [email protected] Excel Discussion (Misc queries) 3 January 4th 05 11:04 PM
EXCEL SHARED user count limitation TMG Setting up and Configuration of Excel 0 December 27th 04 10:17 PM
how do I show dates in a column in an excel worksheet? papacradd Excel Discussion (Misc queries) 1 December 8th 04 02:33 PM
Using Dates in Count functions HWade Excel Worksheet Functions 1 December 6th 04 10:25 PM


All times are GMT +1. The time now is 09:20 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"