View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PP PP is offline
external usenet poster
 
Posts: 3
Default Average per block

Hi all,

Could anyone help me in solving this problem.

I have a dataset in one column (G) containing only numbers. Every nth
row in that column is empty (so it varies). In this empty cell I want
to calculate the average of the n cells above. n is defined by the next
empty row. The data looks like this:
G
3
3
3
empty
3
3
empty
3
3
3
3
3
empty

My question is: Is there a VBA-sollution to insert an average in every
empty cell and where the average is based on the n cells above untill
its hits another empty cell.