Excel: Determining the Accounting Week of a Date

Last reviewed: November 30, 1994
Article ID: Q81028
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
  • Microsoft Excel for the Macintosh, versions 2.x, 3.0, 4.0, 5.0

SUMMARY

The following formula returns the number of the accounting week for a date contained in cell A1 on a worksheet:

=(DAY(A1+4-WEEKDAY(A1))+MOD(WEEKDAY(DATE(YEAR(A1+4-WEEKDAY(A1)),MONTH(A1+ 4-WEEKDAY(A1)),1))+2,7))/7

The following formula returns the number of the accounting month for the same date (1,2,3, and so on, for January, February, March, and so on)

=MONTH(A1-WEEKDAY(A1)+4)

MORE INFORMATION

Accounting weeks begin on Sunday and end on Saturday. All dates within an accounting week belong to the month of the Wednesday of that week. 2/1/91, for example, is a Friday and thus falls in the fifth accounting week of January (because the Wednesday of that business week falls on 1/30/91).

REFERENCES

"Microsoft Excel Function Reference," for the Macintosh, version 3.0, pages 249


KBCategory: kbusage
KBSubcategory:

Additional reference words: 2.2 2.20 3.0 3.00 4.0 4.00 5.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.