Filling Down formulas

Bagman

New Member
Joined
Jun 23, 2010
Messages
2
In cell N9 I am averaging a set of data from another tab in the workbook:
=AVERAGE('Daily Actual Data'!F21:F27)

In cell N10 I am averaging another set of data from another tab in the workbook:
=AVERAGE('Daily Actual Data'!F28:F34)

In cell N11:N100 I would like the formula to continue to fill down adding 7 to each side of the cell group. Is there an easy way to make this formula fill down in this way without having to enter each group individually?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Quick macro solution
Code:
Sub test()
    Dim c As Range, RowNum As Integer
    RowNum = 21
    For Each c In Range("N11:N100")
        c.Formula = "=AVERAGE('Daily Actual Data'!F" & RowNum & ":F" & RowNum + 6 & ")"
        RowNum = RowNum + 7
    Next c
End Sub
 
Upvote 0
quick and easy
use this formula

in N9
=average(offset('Daily Actual Data'!$F$14,Row(A1)*7,0,7,1))
fill down, this will use the Row(A1) to retrieve a spacing increment of the row number, thus 1, next line will be 2, then 3.

This will allow the formula to shift down 7 rows at a time and will average the next 7x1 range from that point.

Regards,
jc

Edits: changed everything to sevens
 
Last edited:
Upvote 0

Forum statistics

Threads
1,222,749
Messages
6,167,971
Members
452,158
Latest member
MattyM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top