Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Counting number of weeks in a period (Excel 2000 SR1)

    Is there an Excel function which will count the number of weeks in a given period?

    Thanks in advance,

    Christa

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Counting number of weeks in a period (Excel 2000 SR1)

    There does not seem to be a specific function for subtracting/adding weeks. However you could simply subtract one date from anothre and divide the answer by 7. If you want only the number of whole weeks the use =INT((A2-A1)/7), where A1 and A2 contain the date values. If you want to compute fractional values just omit the INT function.

    The following is a custom function which will do the same job (whole numbers only) :<pre> Function WeekDiff(A As Date, B As Date)
    WeekDiff = DateDiff("ww", B, A)
    End Function</pre>

    Hope that helps you

    Andrew C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •