I'm trying to figure out how to proceed in calculating an average with following conditions:
In column B, I'm looking for the average of variable length, defined by a Time value (e.g. 5 from cell 'Time') meaning this would be the average of the 5 first numbers from column A. The average calculation will appear in column B in the last of that Time row, i.e. the 5th row, starting from the row in which column A starts.
Column A's first number does not start in row 2 though, but in a lower row, probably somewhere between rows 20 and 50.
Example:
Column A starts in row 21;
Time = 5;
Result: Average in column B in row 26 with average of 5 first values of column A.
How can I write VBA code for such a formula?
Thanks for your help.
In column B, I'm looking for the average of variable length, defined by a Time value (e.g. 5 from cell 'Time') meaning this would be the average of the 5 first numbers from column A. The average calculation will appear in column B in the last of that Time row, i.e. the 5th row, starting from the row in which column A starts.
Column A's first number does not start in row 2 though, but in a lower row, probably somewhere between rows 20 and 50.
Example:
Column A starts in row 21;
Time = 5;
Result: Average in column B in row 26 with average of 5 first values of column A.
How can I write VBA code for such a formula?
Thanks for your help.