L
Lara Shook
Here's my array formula.
{=AVERAGE(($A$9:$A$170>=BeginYear)*($A$9:$A$170<=EndYear)*
($B$9:$B$170=DitchName)*(C$9:C$170>0)*E$9:E$170)}
I have years in column A, ditch names in column B, data
in columns C and D, and ratios in column E. My formula
should calculate the average of the ratios for the
particular ditch for the range of years entered in C177
and C178. Sum works fine. Average assumes 0's for all
rows that don't meet the criteria. Like this:
=average(0,0,0,0,0,0,1.45,0,0,0,2.5,0,0,0,0,0...).
How do I get it to exclude the zeros? I did calculate
the average by using the sum/#rows, but there are some
years where there is no data (in column C), which messes
this average up as well. Thanks in advance!
{=AVERAGE(($A$9:$A$170>=BeginYear)*($A$9:$A$170<=EndYear)*
($B$9:$B$170=DitchName)*(C$9:C$170>0)*E$9:E$170)}
I have years in column A, ditch names in column B, data
in columns C and D, and ratios in column E. My formula
should calculate the average of the ratios for the
particular ditch for the range of years entered in C177
and C178. Sum works fine. Average assumes 0's for all
rows that don't meet the criteria. Like this:
=average(0,0,0,0,0,0,1.45,0,0,0,2.5,0,0,0,0,0...).
How do I get it to exclude the zeros? I did calculate
the average by using the sum/#rows, but there are some
years where there is no data (in column C), which messes
this average up as well. Thanks in advance!