# Thread: Weeknum Thanks: 0 Likes: 0

1. ## Weeknum

I have a formula below , where I need the week number from 1 - 13 depending on the upload date & what Qtr we are in.

=WEEKNUM(J4058)-WEEKNUM(LOOKUP(J4058,DATE(YEAR(J4058),{3,6,9,12},30)))

When a new QTR starts, the weeknum should be "1", however it keeps populating as "0".

Any help would be appreciated.

2. ## Re: Weeknum

You could also try this:

=IF(MOD(WEEKNUM(J4058),13)=0,13,MOD(WEEKNUM(J4058),13))

3. ## Re: Weeknum

Originally Posted by tyija1995
You could also try this: =IF(MOD(WEEKNUM(J4058),13)=0,13,MOD(WEEKNUM(J4058),13))
Unfortunately that did not work, see below example where the new week count starts at 0 and should start at 1
 28/06/2019 28-Jun-19 2019 JUN Qtr June 13 01/07/2019 01-Jul-19 2019 SEP Qtr July 0

4. ## Re: Weeknum

That formula gives me 1 not 0
Is the date in J4508 a real date, or text?

5. ## Re: Weeknum

yes , it is a date.

6. ## Re: Weeknum

This is what I get
IJ
4101/07/2019
5208/07/2019
6315/07/2019
7422/07/2019
8529/07/2019
9605/08/2019
10712/08/2019
11819/08/2019
12926/08/2019
131002/09/2019
141109/09/2019
151216/09/2019
161323/09/2019
17130/09/2019

Request

Worksheet Formulas
CellFormula
I4=IF(MOD(WEEKNUM(J4),13)=0,13,MOD(WEEKNUM(J4),13))

7. ## Re: Weeknum

Your formula works, i forgot to change the lookup cells when i pasted it in!!

Thanks very much.

8. ## Re: Weeknum

It's not my formula, it's @tyija1995 that supplied it.

But glad it's working & thanks for the feedback

9. ## Re: Weeknum

Thanks guys - glad it's working now, have a good day!