View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Zero in Average problem

Try this:

=AVERAGE(IF(OR(BD4=0,BE4=0),{""},BD4-BE4),IF(OR(BH4=0,BI4=0),{""},BH4-BI4),IF(OR(BL4=0,BM4=0),{""},BL4-BM4))

--
Biff
Microsoft Excel MVP


"Gizmo" wrote in message
...
Excel2003
I have a page containing this formula in Column GF:
=AVERAGE((BD4-BE4),(BH4-BI4),(BL4-BM4))
How can I check each range for 0 before performing the calculation?

If any of the cells contain 0, I want to exclude it from the average.

ex:
BD4 =4,BE4 =2,BH4 =4,BI4 =2,BL4 =4,BM4 =2
Average = 2
If any of these cells = 0, remove it and its accompanying cell from the
Average formula.
BD4 =4,BE4 =2,BH4 =0,BI4 =2,BL4 =4,BM4 =2
Average = 2