ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel counting days (https://www.excelbanter.com/excel-discussion-misc-queries/218304-excel-counting-days.html)

tmann

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'.?

Mike H

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'.?


Mike H

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'.?


David Biddulph[_2_]

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'.?




Mike H

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'.?





tmann

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'.?


tmann

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'.?






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com