PPRuNe Forums - View Single Post - Excel - Applying formulae down a column and calculating a rolling sum
Old 10th Feb 2011, 15:35
  #1 (permalink)  
acbus1
 
Join Date: Aug 2002
Location: England.
Posts: 440
Likes: 0
Received 0 Likes on 0 Posts
Excel - Applying formulae down a column and calculating a rolling sum

Excel question, please, if any experts are watching in.

I've searched some of the online help forums and am getting nowhere.

To simplify the description:

Assume, to begin with:

I have a column of four numbers in cells A1 to A4
I have a column of four numbers in cells B1 to B4


In column C1 I need cell A1 contents multiplied by 2 minus cell B1 contents
In column C2 I need cell A2 contents multiplied by 2 minus cell B2 contents
In column C3 I need cell A3 contents multiplied by 2 minus cell B3 contents
In column C4 I need cell A4 contents multiplied by 2 minus cell B4 contents

I could insert:

=2*A1-B1 in cell C1
=2*A2-B2 in cell C2
=2*A3-B3 in cell C3
=2*A4-B4 in cell C4

Unfortunately, I currently have 450 numbers in each A and B column, not just four.

How could I quickly (without typing the required equation 450 times, with appropriate alteration each time) achieve the above operation 450 times, please?

Having achieved that, I then need to calculate a rolling sum of 100 adjacent 'C column' numbers, starting at C1 and:

Displaying the sum of C1 to C100 in cell D1
Displaying the sum of C2 to C101 in cell D2
Displaying the sum of C3 to C102 in cell D3
etc
etc

Can anyone advise, please?
acbus1 is offline