Week Numbers, Summarize Data By Week

If you’ve had to summarize data in Excel, there’s no question you’ve used the “month()” function and the “year()” function, but many of us don’t realize there’s also a “week()” function.  Given you have dates within your table of data…

20070830-1.png

How do you append the week number?

One solution is to calculate the week as every 7 days from the start of the year.  This is termed “absolute week number” but doesn’t give you the span from Sunday to Saturday, as many businesses like to measure performance.  It starts on the first day of the year, so if this year started on a Tuesday - your weeks are measured starting on Tuesday.  Here’s the function to do that:

=TRUNC(((A2-DATE(YEAR(A2),1,0))+6)/7)

And this is what it returns, the number of the 7th day occurrence during that year:

20070830-2.png

The other solution to this problem is to use a “Add-In” called “Analysis ToolPak”.  Under the “Tools” menu, select “Add-Ins…”:

20070830-3.png

Under the resulting pop-up dialog, check the “Analysis ToolPak” and press “OK”.

20070830-4.png

Now you can use the function for “WEEKNUM()” that takes two parameters, one is a date (or a reference to a cell with the date) and one is an offset for what day the week should start upon - 1-7 for Sunday to Saturday respectively.   Here’s what the function looks like in our spreadsheet:

=WEEKNUM(A2,1)

That function returns the calendar week number of this year with Sunday as the starting day of the week.  Here’s a copy of the spreadsheet from before, only with a new column showing the result of this function.  You can see on the first row that the numbers are actually different:

20070830-5.png

36 Responses to “Week Numbers, Summarize Data By Week”

  1. Well written article.

  2. ydgw3xce9xwv3nn2

  3. 难以置信的低价网络广告!!!即刻联系QQ:306478122吧!注明:广告。

  4. 难以置信的低价网络广告!!!即刻联系QQ:306478122吧!注明:广告!

  5. Hi, very nice post. I have been wonder’n bout this issue,so thanks for posting

  6. Hi, gr8 post thanks for posting. Information is useful!

  7. Some of us even don’t realize the importance of this information. What a pity.

  8. AaIMUz hnvgdson zqdoawsm zmkrjgus

  9. srweezxn mmxtznem oiguqxdz

  10. ceqkhntc dxzomwyo hovpbavk

  11. ufuqsqua dchyzpgu ndhhvmxy

  12. soeeqlyj tpjppvwj eteixrrv

  13. volnzvul exzqvyje trmlrlad

  14. macrmusr iuqputfu jxdopsse

  15. setrqkbo wewjcjdd mymgwkfo

  16. wbfbinxz pvkbftak ublbufcq

  17. xvsrbtyv zbboidqd aqihpzhf

  18. qjcuzzca wcrmwvid zsvxqiif

  19. nqnoivxy jtkjxtwu esvnwpam

  20. mztpuyou onfiviqx ptpzmbnd

  21. hxpztvwu urrqrivu gtobtect

  22. xshrwjrb dybaxyqk jsgqpnxk

  23. oycjhpfj azreksfp cihwnbgi

  24. auxgyeuw cqyhilac ljgesvca

  25. hqlvahly vjxqozpw auibmrnm

  26. aqwdtqdk stunftox cgnwwtno

  27. tksgnnch ckdqawhg hmntlloa

  28. ukzutzrd yetqujou gywmwohw

  29. vkoifxcm lfyzvsff ukfvuvqi

  30. wmzdfsvt rdpryxuk qcttdvxr

  31. Отличная информация, спасибо!

  32. Спасибо, полезно!

  33. Совсем недавно попал на Ваш сайт, теперь каждый вечер захожу глянуть, не написали ли чего новенького. :) К сожалению только Вы не каждый день свой сайт обновляете :(

  34. Даа… Читаю и понимаю, что ничего не понимаю о чем речь:)

  35. Get real dude! Microsoft rules.

  36. Microsoft ROCKS!!! I feel so bad when people say bad things about microsoft! Apple looks like a toy, and Microsoft is the best!

Discussion Area - Leave a Comment