Forum Discussion
Formula with % and averages???
Hey guys,
I'm hoping for a solution to a wee problem...
I'm looking for the average of a number of cells. There is a formula in each of these cells, some cells are populated with data and some are not. The ones that are not, have the value of 0% displayed and will have until information is entered. Data won't be entered in for some time.
The problem I'm having is that the the average % being returned is including the 0%'s and thereby reducing the average. Is there any way around this, do you think?
The story is related to percentage attendance at events. 7 in total throughout the year, so I'm looking to return the average attendance for the periods that have passed only, but I do what to have the formulas in the other cells in advance.
Your help would be greatly appreciated!
Cheers
Alison Flynn , that could be
=SUM(FE6,HJ6,JO6,LT6,NY6,QD6,SI6)/INDEX(FREQUENCY((FE6,HJ6,JO6,LT6,NY6,QD6,SI6),0),2)
Source is here https://www.exceldashboardtemplates.com/how-to-averageif-excluding-zeros-and-blanks-for-non-contiguous-ranges-in-excel/
9 Replies
- Rusty DaneBrass Contributor
- Alison FlynnBrass Contributor
Hi Rusty,
Thanks for this. Not sure how it will fit in to the formula I have - here's what I've got:
=AVERAGE(FE6,HJ6,JO6,LT6,NY6,QD6,SI6) - yes, a big database!
I tried =AVERAGE(FE6,HJ6,JO6,LT6,NY6,QD6,SI6,"<>0") but it's returning a #value.
Any thoughts?
- TwifooSilver ContributorTry this:
=SUM(FE6,HJ6,JO6,LT6,NY6,QD6,SI6)/
((FE6<>0)+(HJ6<>0)+(JO6<>0)+(LT6<>0)+(NY6<>0)+(QD6<>0)+(SI6<>0))