View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GMCN
 
Posts: n/a
Default OFFSET to include blank cells

Hi, help required please before this computer exits through the nearest
window!

I am using the formula

=AVERAGE(OFFSET(D6,COUNTIF(D7:D27,"=0%"),,-5,))

to give me a % average over the last 5 entries in my worksheet. After
much searching of various groups I managed to get it to average those
cells which are not blank. However I still cannot fathom how to get
OFFSET to accept the fact that there are blank cells. EG if D7 happens
to be blank then the last five entries start from the 2nd last entry.
Also if there happens to be a blank within the column then OFFSET
starts its count again from the next available cell containing data.

I need to have a formula which averages the last 5 entries which are =
0 no matter if there are empty cells in between. 1 cell in the column
will be filled from the results of another sheet's activity each
working day throughout the month so I do not want the formula to
activate until at least 5 entries have been made.

I seem to be asking for quite a lot here but I would be grateful if
anybody could help with any part of my request.

Thank you in advance.