#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Formula for weeks

I was wondering if there is a formula to calculate how many weeks it is from
today to a certain date
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default 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
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
Formula to return Vacation weeks Sharon Excel Discussion (Misc queries) 1 November 13th 09 07:32 AM
Formula for # weeks between 2 dates dmasch Excel Discussion (Misc queries) 3 September 26th 07 06:12 PM
Formula for calculating the last four weeks Huber57 Excel Discussion (Misc queries) 1 March 28th 07 02:20 PM
Excel formula to change a value every 2 weeks Bobski Excel Discussion (Misc queries) 2 January 11th 06 03:21 PM
calculate weeks from a start date ( not yr weeks) Todd F. Excel Worksheet Functions 6 November 27th 04 05:53 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"