#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Excel counting days

I would like to know how to get Excel to count the number days between 2
dates inclusive of both dates. it is to count haw many days a client is on a
health program. I have tried the 'days365' function but this does not count
the second date and so the count is always one day short.
Am I able to get the function to add 1 day to the 'days 365'.?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Excel counting days

Hi,

Try this with the earlier date in A1

=DATEDIF(A1,B1,"d")+1

Note that datedif isn't documented in Excel but is well documented here

http://www.cpearson.com/excel/datedif.aspx

Mike

"tmann" wrote:

I would like to know how to get Excel to count the number days between 2
dates inclusive of both dates. it is to count haw many days a client is on a
health program. I have tried the 'days365' function but this does not count
the second date and so the count is always one day short.
Am I able to get the function to add 1 day to the 'days 365'.?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Excel counting days

I should have mentioned that Excel will try and be helpful and format this as
a date so reformat as general.

Mike

"Mike H" wrote:

Hi,

Try this with the earlier date in A1

=DATEDIF(A1,B1,"d")+1

Note that datedif isn't documented in Excel but is well documented here

http://www.cpearson.com/excel/datedif.aspx

Mike

"tmann" wrote:

I would like to know how to get Excel to count the number days between 2
dates inclusive of both dates. it is to count haw many days a client is on a
health program. I have tried the 'days365' function but this does not count
the second date and so the count is always one day short.
Am I able to get the function to add 1 day to the 'days 365'.?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Excel counting days

.... or, more simply, =B1-A1+1
You don't need DATEDIF if you are working in days.
--
David Biddulph

"Mike H" wrote in message
...
Hi,

Try this with the earlier date in A1

=DATEDIF(A1,B1,"d")+1

Note that datedif isn't documented in Excel but is well documented here

http://www.cpearson.com/excel/datedif.aspx

Mike

"tmann" wrote:

I would like to know how to get Excel to count the number days between 2
dates inclusive of both dates. it is to count haw many days a client is
on a
health program. I have tried the 'days365' function but this does not
count
the second date and so the count is always one day short.
Am I able to get the function to add 1 day to the 'days 365'.?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Excel counting days

David,

Your absolutely correct and I should have mentioned it but I prefer to
introduce the datedif formula for doing these type of calculations
particularly because it's undocumented. Have MS changed that in E2007 I
wonder.

Mike

"David Biddulph" wrote:

.... or, more simply, =B1-A1+1
You don't need DATEDIF if you are working in days.
--
David Biddulph

"Mike H" wrote in message
...
Hi,

Try this with the earlier date in A1

=DATEDIF(A1,B1,"d")+1

Note that datedif isn't documented in Excel but is well documented here

http://www.cpearson.com/excel/datedif.aspx

Mike

"tmann" wrote:

I would like to know how to get Excel to count the number days between 2
dates inclusive of both dates. it is to count haw many days a client is
on a
health program. I have tried the 'days365' function but this does not
count
the second date and so the count is always one day short.
Am I able to get the function to add 1 day to the 'days 365'.?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Excel counting days

Thanks Mike and to all,
Formula worked well and has solved the problem. i had tried to format the
whole collumn for this formula but the empty fields then posted valies of '1'
which affected the tally cell tjhat I set up at the bottom. i'vre solved this
by dragging the formula down each time I add a new client to the list.
Thanks again. A big help.

"Mike H" wrote:

Hi,

Try this with the earlier date in A1

=DATEDIF(A1,B1,"d")+1

Note that datedif isn't documented in Excel but is well documented here

http://www.cpearson.com/excel/datedif.aspx

Mike

"tmann" wrote:

I would like to know how to get Excel to count the number days between 2
dates inclusive of both dates. it is to count haw many days a client is on a
health program. I have tried the 'days365' function but this does not count
the second date and so the count is always one day short.
Am I able to get the function to add 1 day to the 'days 365'.?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Excel counting days

Thanks David,
I tried both methods and have gone with the DATEDIF
formula. But your reply was greatly appreciated and the problem has now been
solved.
Grant


"David Biddulph" wrote:

.... or, more simply, =B1-A1+1
You don't need DATEDIF if you are working in days.
--
David Biddulph

"Mike H" wrote in message
...
Hi,

Try this with the earlier date in A1

=DATEDIF(A1,B1,"d")+1

Note that datedif isn't documented in Excel but is well documented here

http://www.cpearson.com/excel/datedif.aspx

Mike

"tmann" wrote:

I would like to know how to get Excel to count the number days between 2
dates inclusive of both dates. it is to count haw many days a client is
on a
health program. I have tried the 'days365' function but this does not
count
the second date and so the count is always one day short.
Am I able to get the function to add 1 day to the 'days 365'.?




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
Counting half days holiday and sickness in excel Wayne New Users to Excel 4 December 16th 08 02:37 PM
Counting Days Belinda7237 Excel Worksheet Functions 6 June 18th 08 06:13 PM
Counting Days Belinda7237 Excel Worksheet Functions 2 June 16th 08 06:01 PM
Counting days tinkertron Excel Worksheet Functions 5 April 7th 05 08:11 AM
counting days Anthony Excel Discussion (Misc queries) 4 February 3rd 05 09:08 PM


All times are GMT +1. The time now is 08:16 AM.

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"