ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   count day's (https://www.excelbanter.com/excel-worksheet-functions/220216-count-days.html)

moshe

count day's
 
when i enter a date in A1 and another date in B1, i want that in C1 should
calculate the days,
EX: if the dates are from 02/10/09 - 02/20/09, it should be written 1 week
and 3 days, (not 10 days)
--
mf

Bob Phillips[_3_]

count day's
 
=INT((B1-A1)/7)&" week "&MOD(B1-A1,7)&" days"

--
__________________________________
HTH

Bob

"moshe" wrote in message
...
when i enter a date in A1 and another date in B1, i want that in C1 should
calculate the days,
EX: if the dates are from 02/10/09 - 02/20/09, it should be written 1 week
and 3 days, (not 10 days)
--
mf




Pecoflyer[_153_]

count day's
 

moshe;223756 Wrote:
when i enter a date in A1 and another date in B1, i want that in C1
should
calculate the days,
EX: if the dates are from 02/10/09 - 02/20/09, it should be written 1
week
and 3 days, (not 10 days)
--
mf


Try =int((finishdate-startdate)/7)&" weeks
"&mod((finishdate-startdate),7)&" days"


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=61931


Mike H

count day's
 
Try this

=INT(DATEDIF(A1,B1,"d")/7) &" Weeks " &MOD(DATEDIF(A1,B1,"d"),7) & " Days"

Note that DATEDIF isn't documented in Excel so for help look here

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

Mike

"moshe" wrote:

when i enter a date in A1 and another date in B1, i want that in C1 should
calculate the days,
EX: if the dates are from 02/10/09 - 02/20/09, it should be written 1 week
and 3 days, (not 10 days)
--
mf


David Biddulph[_2_]

count day's
 
And note also that if you are counting days, you don't need DATEDIF.

DATEDIF(A1,B1,"d")
is the same as
B1-A1
--
David Biddulph


"Mike H" wrote in message
...
Try this

=INT(DATEDIF(A1,B1,"d")/7) &" Weeks " &MOD(DATEDIF(A1,B1,"d"),7) & " Days"

Note that DATEDIF isn't documented in Excel so for help look here

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

Mike

"moshe" wrote:

when i enter a date in A1 and another date in B1, i want that in C1
should
calculate the days,
EX: if the dates are from 02/10/09 - 02/20/09, it should be written 1
week
and 3 days, (not 10 days)
--
mf





All times are GMT +1. The time now is 09:18 PM.

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