Hi,

I am new to this forum and new to vba coding.

I hope i am posting this in the correct part of the forum, if not please inform me.

My problem is the following:

I have a column of data of 40 values long. I wish to create a new column of data where the first value in the new column consists of the average value from the first 5 values in the original column. The second value in the new column is the average of the next 5 values in the original column. The third value in the new column is the average of the next 5 values in the original column, and so on. Therefore my new column will consist of 8 values. (40/5= 8)

I will then look to expand on this work by allowing a user to input a "whole number" value, where this value will dictate how many values will be used to calculate the average. For example if the user input 2, the new column would be 20 values long, and each value will consist of the average between 2 values in the original column.


Any help would be greatly apreciated.

Cheers,