weeknumber formula

Hi,
In Israel our week starts from Sunday, therefore weeknumber formula calculates Sunday for previous week number. I use grid template and even on project template changing Sunday as week start, the formula "weeknumber" presents Sunday as previous week number, pls. see pic below.
How can I get Sunday as new weeknumber?
thanks
Yuval
Best Answer
-
You would add an IF statement to say that if the WEEKDAY is 1 (Sunday) then add 1 to the WEEKNUMBER. Not sure why WEEKDAY starts with Sunday but WEEKNUMBER starts with Monday, but that's how it has been since I can Remember.
=WEEKNUMBER(Date@row) + IF(WEEKDAY(Date@row) = 1, 1, 0)
Answers
-
You would add an IF statement to say that if the WEEKDAY is 1 (Sunday) then add 1 to the WEEKNUMBER. Not sure why WEEKDAY starts with Sunday but WEEKNUMBER starts with Monday, but that's how it has been since I can Remember.
=WEEKNUMBER(Date@row) + IF(WEEKDAY(Date@row) = 1, 1, 0)
-
Thanks a lot Paul, it works
Yuval
Help Article Resources
Categories
Check out the Formula Handbook template!