K
Kevin Carter
Hi
I am trying to insert the week numbers
i would like the week to start on a Saturday and end on the Friday
i have tried this formula
=TRUNC(((StartDate-DATE(YEAR(StartDate),1,1)+
MOD(DayOfWeek-WEEKDAY(DATE(YEAR(StartDate),1,1)),7))+6)/7)
where StartDate is the whose week number is to be found, and DayOfWeek is the day of week number (1 = Sunday, 2 = Monday, ..., 7 = Saturday).
my formula :-
=TRUNC(((B21-DATE(YEAR(B21),1,1)+MOD(7-WEEKDAY(DATE(YEAR(B21),1,1)),7))+6)/7)
on chip pearsons web site
what i am finding when i get to Friday of the first week and the week number changes to 2, later in the year (17-1-12)a Tuesday the week number changes to 4 which should be week 3
any ideas how i can resolve this
thanks
kevin
I am trying to insert the week numbers
i would like the week to start on a Saturday and end on the Friday
i have tried this formula
=TRUNC(((StartDate-DATE(YEAR(StartDate),1,1)+
MOD(DayOfWeek-WEEKDAY(DATE(YEAR(StartDate),1,1)),7))+6)/7)
where StartDate is the whose week number is to be found, and DayOfWeek is the day of week number (1 = Sunday, 2 = Monday, ..., 7 = Saturday).
my formula :-
=TRUNC(((B21-DATE(YEAR(B21),1,1)+MOD(7-WEEKDAY(DATE(YEAR(B21),1,1)),7))+6)/7)
on chip pearsons web site
what i am finding when i get to Friday of the first week and the week number changes to 2, later in the year (17-1-12)a Tuesday the week number changes to 4 which should be week 3
any ideas how i can resolve this
thanks
kevin