Thank you for writing back. As I reviewed your requirement, it is really a rolling average and that can be done by Excel. However, if you want to EXTEND the range for particular average computation due zero work on particular weeks, that cannot be done using the rolling average formula.
However, there are workarounds, so please tell me which is feasible or useful to you so that I can start working on it.
First, we can create a "helper sheet" that shows a copy of the data of your original sheet but with ALL the rows with blank or zero hour removed. In that way, we can use the regular rolling average formula.
Second, we will use the regular rolling average formula in a column, and next to that, we will add a helper column that will calculate the rolling average for non-zero rows. That is, the result shown be will the average for 12 weeks, and if the range is below 12, the result will be blank.