ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula for weeks (https://www.excelbanter.com/excel-discussion-misc-queries/251395-formula-weeks.html)

Shihachi

Formula for weeks
 
I was wondering if there is a formula to calculate how many weeks it is from
today to a certain date

Bernard Liengme

Formula for weeks
 
This formula will calculate how many days
=DATEDIF(Date1,Date2,"d")

or =DATEDIF(A1, B1,"d") with dates in A1 and B1

If by week you mean any seven days (not a Sun to Sat) then
=DATEDIF(A1, B1,"d") /7

best wishes
--
Bernard Liengme
http://people.stfx.ca/bliengme
Microsoft Excel MVP

"Shihachi" wrote in message
...
I was wondering if there is a formula to calculate how many weeks it is
from
today to a certain date



Mike H

Formula for weeks
 
Hi,

Try this which wil return whole wee and a decimal for the part week

=ABS((DATE(2009,1,2)-TODAY())/7)

or this to return whole weeks rounded down

=INT(ABS((DATE(2009,1,5)-TODAY())/7))

You can use cell references for the dates

Mike

"Shihachi" wrote:

I was wondering if there is a formula to calculate how many weeks it is from
today to a certain date


Ron Rosenfeld

Formula for weeks
 
On Fri, 18 Dec 2009 11:58:38 -0400, "Bernard Liengme"
wrote:

This formula will calculate how many days
=DATEDIF(Date1,Date2,"d")

or =DATEDIF(A1, B1,"d") with dates in A1 and B1

If by week you mean any seven days (not a Sun to Sat) then
=DATEDIF(A1, B1,"d") /7


Or you could use:

=B1-A1

or

=(B1-A1)/7
--ron

Bernard Liengme

Formula for weeks
 
Ah but that would be too simple for me after 3 hours tutoring calculus!
Yes, my answer was stupid!
Bernard

"Ron Rosenfeld" wrote in message
...
On Fri, 18 Dec 2009 11:58:38 -0400, "Bernard Liengme"
wrote:

This formula will calculate how many days
=DATEDIF(Date1,Date2,"d")

or =DATEDIF(A1, B1,"d") with dates in A1 and B1

If by week you mean any seven days (not a Sun to Sat) then
=DATEDIF(A1, B1,"d") /7


Or you could use:

=B1-A1

or

=(B1-A1)/7
--ron



Ron Rosenfeld

Formula for weeks
 
On Fri, 18 Dec 2009 17:05:10 -0400, "Bernard Liengme"
wrote:

Ah but that would be too simple for me after 3 hours tutoring calculus!
Yes, my answer was stupid!
Bernard


I always wondered by "they" bothered with the "d" option in DATEDIF. But the
function is apparently broken in 2007 SP2 so I've generally stopped
recommending it for anything.

Now I have to edit my various sheets that use it <sigh.

--ron


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

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