Excel Excel - How to select the last x entries in a column?

Joined
Apr 9, 2006
Messages
2
Reaction score
0
Can anyone help with this. I need to be able to select the last 12 (variable) entries in a column in an Excel worksheet. These entries need to be totalled and the average then worked out. Any ideas?

Thanks,

David
 
If its just a simple formula then just insert =average(b4:b15) into a cell in column d2 , b4:b15 just hold the data you need to average ,this automatically adds then averages the data range ?? does this help ??
 

Attachments

Rush's formula would have to be entered manually if the range isn't always the same (ie column A has 32 entries, column B has 49 entries, column C has 101 entries etc.).

To have a macro do it automatically the first thing you would have to do is find the last populated cell in each column. After that you would have to count backwards to add the contents of the last twelve cells and then average them. The code could then be copied so that the macro would do that for every column that has data in it.

I'm sorry I don't know the code to do it, I just know it can be done and that's one way to do it :)
 
Back
Top