Formula for weeks

S

Shihachi

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

Bernard Liengme

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
 
M

Mike H

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
 
R

Ron Rosenfeld

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
 
B

Bernard Liengme

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

Ron Rosenfeld

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
 
Top