View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Average non-adjacent cells & exclude zeros

One way

=AVERAGE(IF((MOD(COLUMN(H12:AJ12),14)=8)*(H12:AJ12 <0),H12:AJ12))


needs to be entered with ctrl + shift & enter

this assumes you have the same number of columns between each value like you
have in your example


--


Regards,


Peo Sjoblom


"Danni2004" wrote in message
...
I want to find an average of three cells that are non-adjacent and will
occasionally have a zero in it.
Example:
=AVERAGE(H12,V12,AJ12)

How can I rewrite this so that the formula will not include the cell in
the
average if its value is zero?

Thanks!