ie. lookup range "lw1" (leave for week 1 which is range a1:h6) and sum row 3
for kerry or row 4 for sue etc. next year just need to relabel range "lw1" to
cater for day/date difference.
> I have a yearly roster with 4 staff 1st sheet="roster". Am trying to sum
> hours for each week for staff on their own sheet, eg 2nd sheet="kerry". Am
[quoted text clipped - 10 lines]
> 5 john 1 9
> 6 brad 3 7
One way to set it up to work for the whole year (52 weeks)
illustrated in this sample:
http://www.freefilehosting.net/download/3bmle
52 weeks template by staff.xls
Source data is assumed in Roster, within cols A to H, with 6 lines per week
Click Insert > Name > Define
Put under "Names in workbook:": WSN
Put in the "Refers to:" box:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")
))+1,32)
Click OK
The above defines WSN as a name we can use to refer to the sheetname in
formulas. It will auto-extract the sheetname implicitly. Technique came from
a post by Harlan.
In a new sheet named: Kerry
In A1: =WSN (this is just a label to display the sheetname, ie name of
staff, prominently for reference)
Input in B1: Roster (the source sheetname)
List the 52 weeks in A2 down, viz.: Wk1, Wk2, Wk3,... Wk52
Then place in B2
=IF(ISNA(MATCH($A2,INDIRECT("'"&B$1&"'!A:A"),0)),"",SUM(OFFSET(INDIRECT("'"&B$1&"'!B1:H1"),MATCH(WSN,OFFSET(INDIRECT("'"&B$1&"'!A"&MATCH($A2,INDIRECT("'"&B$1&"'!A:A"),0)),,,6),0)+MATCH($A2,INDIRECT("'"&B$1&"'!A:A"),0)-2,)))
Copy B2 down to B53. Col B will return the required totals for each of the
52 weeks for Kerry. To easily propagate sheets for other staff, just make
copies of this sheet and rename the sheets accordingly as: Sue, Brad, John

Signature
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
> ie. lookup range "lw1" (leave for week 1 which is range a1:h6) and sum row 3
> for kerry or row 4 for sue etc. next year just need to relabel range "lw1" to
> cater for day/date difference.
> > I have a yearly roster with 4 staff 1st sheet="roster". Am trying to sum
> > hours for each week for staff on their own sheet, eg 2nd sheet="kerry". Am
[quoted text clipped - 10 lines]
> > 5 john 1 9
> > 6 brad 3 7