How would I add to this formula to stop the #Div/0! when there are no entries. Normally I would use =IFERROR but using the average function as well is confusing me.
=AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales")
Thanks
How would I add to this formula to stop the #Div/0! when there are no entries. Normally I would use =IFERROR but using the average function as well is confusing me.
=AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales")
Thanks
You can use:
=IF(COUNT($C$12:$Z$12),AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"),NA())
It will return a #N/A error, instead of a #DIV/0! error, if you'd prefer no to show any error, replace NA() with "NO ENTRIES", or anything you like.
Did you try IFERROR(your formula,””)?
You don’t say how you tried the iferror formula.
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
I tried putting it in at the beginning, from memory something like:
IFERROR(=AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"))
LeoSkywalker:
That didn't work still showing #Div/0
If you want to use IFERROR:
=IFERROR(AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"),"xxxxxxx")
For COUNT, it will work when there are no entries, however, it will fail if you have any ZEROES as entries.
OK I understand none of the columns have entries as yet so would be zeros.
This is now working as I wanted and leaves the cell as a blank. thanks.
=IFERROR(AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"),"")
Thank you
I have to admit, that is what I recommended in post #3 and who is juco vs scudo?I thought someone was highjacking the thread.
glad you got it resolved.
Sorry about that, over the years when I have forgotten passwords / user name I have had to re-register, (not just this site) and sometimes if I put in the user name it states already being used etc. But yes both names are me :-(I have to admit, that is what I recommended in post #3 and who is juco vs scudo?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks