Average per block

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.

.



Relevant Pages

  • RE: Formula help
    ... Glad I could help, Mike. ... D1 is not equal to nothing, or then not equal to an empty cell. ... figure out how Excel would trap conditions. ...
    (microsoft.public.excel.misc)
  • Re: select rows until empty found
    ... Dim pIndex as long ... Dim pRange as Word.Range ... 'Find row with empty cell in column 2 ... As it is the code will fail if there are no empty ...
    (microsoft.public.word.tables)
  • Re: counting unique items
    ... COUNTIFwill return 0 for that empty cell. ... Put some random entries in A1:A5. ... string from the Countif formulas and delete some of the entries in A1:A5. ...
    (microsoft.public.excel.misc)
  • Re: Need Help With A Loop To Copy
    ... >> I'm just getting started learning Excel VBA and I would ... >> thought a loop structure would be a good way to handle ... >> 8) Stop when an empty cell in Column A is encountered ...
    (microsoft.public.excel.programming)
  • Re: Average per block
    ... Dim iLastRow As Long ... Dim istart As Long ... row in that column is empty. ... empty cell and where the average is based on the n cells above untill ...
    (microsoft.public.excel.worksheet.functions)