D
David Heaton
Hi,
I hope the format for this post works
I'm new to this newsgroup and newsgroups in general and I hope its ok to add
snapshots to posts....
I created a sheet a while back part of which showed a monthly snapshot of
when staff were working. The issue I had was that staff worked on a
rotating 4 week roster not a monthly roster and it took me quite some time
to get it right.
As I said I've only just recently started using this newsgroup and have seen
some very advanced and inventive solutions to problems. As such my question
is this. Could I have achieved the results below using a more efficient
formula or method.
The FortNightRoster sheet contained the rotating fortnightly roster for the
staff ... I needed to repeat week 1 in order to get the transposition to
work...
WEEK 1 WEEK 2 WEEK 3 WEEK 4
NAME Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
Employee Name x x x x x x x x x x x x x x x x x x x x x x x x x
below is the CurrentRoster sheet which ended up like this ( the first col is the first day of whichever month we are in (1/11/07).
NAME Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
Employee Name x x x x x x x x x x x x x x x x x x x x x x
I used the formula
=IF(SUMPRODUCT(((Holiday_Name=$A4)*(HolidayStart<=B$1)*(HolidayEnd>=B$1)))>0,"h",IF((COLUMN(B4)>rostercol),OFFSET(FortNightRoster!$A$3,ROW(B4)-3,COLUMN(B4)-rostercol,1,1),OFFSET(FortNightRoster!$A$3,ROW(B4)-3,COLUMN(B4)+28-rostercol,1,1)))
in all cells in the CurrentRoster sheet.
The NAME cells on both sheets are at A3.
The SUMPRODUCT part was just a reference to a range containing holiday datesand can be ignored for this purpose.
ROSTERCOL was just a static reference to the column the roster started on,in this case 2
I hope i have explained this ok.
thanks in advance
David Heaton
I hope the format for this post works
I'm new to this newsgroup and newsgroups in general and I hope its ok to add
snapshots to posts....
I created a sheet a while back part of which showed a monthly snapshot of
when staff were working. The issue I had was that staff worked on a
rotating 4 week roster not a monthly roster and it took me quite some time
to get it right.
As I said I've only just recently started using this newsgroup and have seen
some very advanced and inventive solutions to problems. As such my question
is this. Could I have achieved the results below using a more efficient
formula or method.
The FortNightRoster sheet contained the rotating fortnightly roster for the
staff ... I needed to repeat week 1 in order to get the transposition to
work...
WEEK 1 WEEK 2 WEEK 3 WEEK 4
NAME Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun
Employee Name x x x x x x x x x x x x x x x x x x x x x x x x x
below is the CurrentRoster sheet which ended up like this ( the first col is the first day of whichever month we are in (1/11/07).
NAME Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
Employee Name x x x x x x x x x x x x x x x x x x x x x x
I used the formula
=IF(SUMPRODUCT(((Holiday_Name=$A4)*(HolidayStart<=B$1)*(HolidayEnd>=B$1)))>0,"h",IF((COLUMN(B4)>rostercol),OFFSET(FortNightRoster!$A$3,ROW(B4)-3,COLUMN(B4)-rostercol,1,1),OFFSET(FortNightRoster!$A$3,ROW(B4)-3,COLUMN(B4)+28-rostercol,1,1)))
in all cells in the CurrentRoster sheet.
The NAME cells on both sheets are at A3.
The SUMPRODUCT part was just a reference to a range containing holiday datesand can be ignored for this purpose.
ROSTERCOL was just a static reference to the column the roster started on,in this case 2
I hope i have explained this ok.
thanks in advance
David Heaton