Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Using WEEKNUMBER() in Numbers

Hi,


I am using the WEEKNUMBER formula in my spreadsheet to calculate the week number based on the date of a Monday.


This used to work correctly (in 2015) but with the new year, it goes wrong.


I tried both with the option 1 (Sunday) and option 2 (Monday) as first day of week.


Did I hit a bug?


Willem

Posted on Jan 18, 2016 6:09 AM

Reply
Question marked as Best reply

Posted on Jan 18, 2016 8:41 AM

I don't think there is a bug in the WEEKNUMBER function. However, I'm guessing you may be looking for the ISO week number. The WEEKNUMBER function does not return the ISO number. To get the ISO week number, if the date is in cell A2, then you can use this formula:


=INT((A2−DATE(YEAR(A2−WEEKDAY(A2−1)+4),1,3)+WEEKDAY(DATE(YEAR(A2−WEEKDAY(A2−1)+ 4 ),1,3))+5)/7)


If your date is in another cell just replace the A2 with that cell's address in the five places that A2 appears in the formula.


SG

1 reply
Question marked as Best reply

Jan 18, 2016 8:41 AM in response to meesterkwartier

I don't think there is a bug in the WEEKNUMBER function. However, I'm guessing you may be looking for the ISO week number. The WEEKNUMBER function does not return the ISO number. To get the ISO week number, if the date is in cell A2, then you can use this formula:


=INT((A2−DATE(YEAR(A2−WEEKDAY(A2−1)+4),1,3)+WEEKDAY(DATE(YEAR(A2−WEEKDAY(A2−1)+ 4 ),1,3))+5)/7)


If your date is in another cell just replace the A2 with that cell's address in the five places that A2 appears in the formula.


SG

Using WEEKNUMBER() in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.