View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Peo Sjoblom[_3_] Peo Sjoblom[_3_] is offline
external usenet poster
 
Posts: 136
Default Excluding cells from average on Excel workbook

I posted this to your original post but you chose to got with another
person's solution that doesn't work


=SUM(F10,F13,F16,F19,F22,F26,F30)/SUMPRODUCT(COUNTIF(INDIRECT({"F10","F13","F16","F1 9","F22","F26","F30"}),"0"))


this will exclude all values zero or less since I assume they cannot be
negative.

However now you seem to have changed the criteria and are using formulas
that can return N/A, so why not fixed those formula so they return 0 or
blank instead of N/A

example


=IF(ISNA(VLOOKUP()),0,VLOOKUP())


if you insist on having formulas that can return N/A then this might work


=SUMPRODUCT(SUMIF(INDIRECT({"F10","F13","F16","F19 ","F22","F26","F30"}),"<"&99^99))/SUMPRODUCT(COUNTIF(INDIRECT({"F10","F13","F16","F1 9","F22","F26","F30"}),"0"))

--


Regards,


Peo Sjoblom


"Beth Gaines" wrote in message
...
I am trying to average a column of percentages but need to exclude some
cells
because they are N/A. The problem is that the cell may be empty but it
has a
function associated with it so it is not being excluded from the average.
I
have tried
=SUM(F10,F13,F16,F19,F22,F26,F30)/COUNTA(F10,F13,F16,F19,F22,F26,F30)but
this
only works if I delete the function from the cell that is N/A. For
example,
I may need F13 to be excluded this time because the numerator and
denominator
were 0 but next time I might need it so I don't want to delete the
function
from the cell. Is there a way to do this? Is it possible to hide the
function so that the cell appears to be empty if there is no number or
letters in it but the function is still being used?
Thanks much