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

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Counting number of weeks in a period (Excel 2000 SR1)

    Author
    Topic
    #361549

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

    Thanks in advance,

    Christa

    Viewing 0 reply threads
    Author
    Replies
    • #546851

      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) :

          Function WeekDiff(A As Date, B As Date)
              WeekDiff = DateDiff("ww", B, A)
          End Function

      Hope that helps you

      Andrew C

    Viewing 0 reply threads
    Reply To: Counting number of weeks in a period (Excel 2000 SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: