• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Running average based on certain number of weeks

leftee08

New Member
Hi - I have been trying to figure out how I can create a formula for an average of numbers based on one number in a cell. For example - I have 15 weeks worth of data going from C3:R3. I have a number in cell B3 that represents the number weeks I need to average. So, B3 = 8 then I need to average cells C3:J3 (result in J4). Then I need to keep that going and average the next 8weeks (D3:K3) then E3:L3 .. and so on. I can dothis simply by the average function and dragging it across. However B3 will be changing often. Its not a constant number. I tried the formula =AVERAGE(OFFSET(C3,COUNT(C3:R3)-8,0,-8)) but it did not work. I transposed the numbers and then used this =AVERAGE(OFFSET(B9,COUNT($B$9:$B$50)-8,0,-8)). This worked. Is ther a way I can use the first one where the data goes from C3:R3?

Can anyone help me???
 
Last edited:
Back
Top