• 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.

Fill down a formula with a constant increment

abdullahk85

New Member
I have a long spread sheet(18000) in which I have to take average of every 20 rows and post them on a new sheet. I use the formula =average(sheet1!A1:A20) and then just to setup a trend I enter the next consecutive numbers i.e A21:A40, A41:A60 and so on in the next few rows. Now when I use the fill handle it doesn't fill it with an increment of 20. It just does with an increment of 1. How can I fill down the average formula with an increment of 20??
 
Hi Abdullah ,


Let us assume your long spreadsheet is labelled SheetX ; let us assume the sheet on which you are going to put in the formulae for the averages is SheetY.


If your formula starts from A1 , then enter the following formula as an array formula , using CTRL SHIFT ENTER :


=AVERAGE(OFFSET(SheetX!$A$1,(20*(ROW(A1)-1)),0,20,1))


Copy this formula downwards , to A2 , A3 and so on.


Narayan
 
One more option would be:

=AVERAGE(INDEX(Sheet1!A:A,(ROWS($A$1:$A1)-1)*20+1):INDEX(Sheet1!A:A,(ROWS($A$1:$A1)*20)))

copy down.


Narayan,

Your formula works for me without CTRL + SHIFT + ENTER.
 
Hi Shrivallabha ,


I agree , since the 20 for the height parameter automatically makes it consider an array of numbers.


My mistake.


Narayan
 
Back
Top