I have over 1000 columns in my dataset. They are all ending in row 375.
Can someone advise how do I create a VBA code which enters a formula in e.g. A376 and instead of the range being e.g. A1:A375 it looks for the last instance of data (e.g. A301) and the first instance of data in the same column (e.g. A178) and enters the formula (for the example AVERAGE) =AVERAGE(A178:A301)?
The same would have to happen for all 1000 columns (some kind of loop I guess).
I'd be greatly obliged if someone could advise. Thanks
[![enter image description here][1]][1]
[![enter image description here][2]][2]
 
    