Forum Discussion

Raskyl's avatar
Raskyl
Copper Contributor
Oct 03, 2022
Solved

Weeknum count up only every 2 weeks

Previously, I asked a question on whether it was possible to calculate weeks on Tuesday and also to allow counting up till the next year. and this is the code I was generously given from a user from ...
  • HansVogelaar's avatar
    HansVogelaar
    Oct 03, 2022

    Raskyl 

    The QUOTIENT function performs integer division. QUOTIENT(A6-43431,14) is equivalent to INT((A6-43431)/14).

     

    A6-43431 is the number of days since 27-Nov-2018.

    QUOTIENT(A6-43431,14) returns the whole number of 14-day periods (i.e. 2 week periods) between 27-Nov-2018 and the data in A6. The date 27-Nov-2018 was chosen so that the result is exactly 100 for Tue 27-Sep-2022. Every 2 weeks, the number will increase by 1.

Resources