Hi
Id like to average hours worked every 5 days but need toexclude days where no hours have been worked. Was playing about with AverageIf to achieve this and wouldnt be aproblem for the formula in cell below (answer is 9.6). However, if I drag the formula along (Formula 2), the average will onlybe for 4 days as itll ignore the zero in the cell for Day 6. Is there a way of dynamically referencing theprevious 5 cells where hours have been worked?
Thanks
[TABLE="width: 436"]
<tbody>[TR]
[TD="width: 53, bgcolor: transparent"]Day 1
[/TD]
[TD="width: 40, bgcolor: transparent"]Day 2
[/TD]
[TD="width: 40, bgcolor: transparent"]Day 3
[/TD]
[TD="width: 40, bgcolor: transparent"]Day 4
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 5
[/TD]
[TD="width: 68, bgcolor: transparent"] Day 6
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 7
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 8
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 9
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 10
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]12
[/TD]
[TD="bgcolor: transparent, align: right"]12
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]9.6
[/TD]
[TD="bgcolor: transparent"]Formula 2
[/TD]
[TD="bgcolor: transparent"]Formula 3
[/TD]
[TD="bgcolor: transparent"]Formula 4
[/TD]
[TD="bgcolor: transparent"]Formula 5
[/TD]
[TD="bgcolor: transparent"]Formula 6
[/TD]
[/TR]
</tbody>[/TABLE]
Id like to average hours worked every 5 days but need toexclude days where no hours have been worked. Was playing about with AverageIf to achieve this and wouldnt be aproblem for the formula in cell below (answer is 9.6). However, if I drag the formula along (Formula 2), the average will onlybe for 4 days as itll ignore the zero in the cell for Day 6. Is there a way of dynamically referencing theprevious 5 cells where hours have been worked?
Thanks
[TABLE="width: 436"]
<tbody>[TR]
[TD="width: 53, bgcolor: transparent"]Day 1
[/TD]
[TD="width: 40, bgcolor: transparent"]Day 2
[/TD]
[TD="width: 40, bgcolor: transparent"]Day 3
[/TD]
[TD="width: 40, bgcolor: transparent"]Day 4
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 5
[/TD]
[TD="width: 68, bgcolor: transparent"] Day 6
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 7
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 8
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 9
[/TD]
[TD="width: 68, bgcolor: transparent"]Day 10
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]12
[/TD]
[TD="bgcolor: transparent, align: right"]12
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]0
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[TD="bgcolor: transparent, align: right"]8
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]9.6
[/TD]
[TD="bgcolor: transparent"]Formula 2
[/TD]
[TD="bgcolor: transparent"]Formula 3
[/TD]
[TD="bgcolor: transparent"]Formula 4
[/TD]
[TD="bgcolor: transparent"]Formula 5
[/TD]
[TD="bgcolor: transparent"]Formula 6
[/TD]
[/TR]
</tbody>[/TABLE]