Hi,
My week 1 starts from August 27th 2017 which would be classed as AW17 (Autumn/Winter).
My week 27 starts from February 25th 2018 which would be classed as SS18 (Spring/Summer).
I need a piece of code that would pull the 17 or 18 from current work calendar.. if I use Format(Now(), "yy") this would obviously give me the 18 that I'm searching for at this exact time period but as soon as it gets to January 1st, it would be off as I'd be going into AW18 and would still be needing 18 up until March 3rd 2019.
If you need me to clarify anything then let me know,
Any help would be greatly appreciated.
My week 1 starts from August 27th 2017 which would be classed as AW17 (Autumn/Winter).
My week 27 starts from February 25th 2018 which would be classed as SS18 (Spring/Summer).
I need a piece of code that would pull the 17 or 18 from current work calendar.. if I use Format(Now(), "yy") this would obviously give me the 18 that I'm searching for at this exact time period but as soon as it gets to January 1st, it would be off as I'd be going into AW18 and would still be needing 18 up until March 3rd 2019.
Code:
WeekNumber = Format(Now() - 238, "ww")
WeekName = Format(Now() - 2, "dddd")
Select Case WeekNumber
Case 1 To 26
Season = "AW" & Format(Now(), "yy")
Case 27 To 53
Season = "SS" & Format(Now(), "yy")
End Select
If you need me to clarify anything then let me know,
Any help would be greatly appreciated.
Last edited: