Hi all,
what is wrong with this:
=IF(((AVERAGE(C7:C18))=0;"";(AVERAGE(C7:C18)))
when C7:C18 have no values yet i get #div/0!
but i ask for "" ,like show nothing.
anyone know a better way to get a blank cell when the outcome of average is 0?
[Solved] Average not showing 0 answer
[Solved] Average not showing 0 answer
Last edited by Hagar Delest on Sun Dec 10, 2017 11:24 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
LibreOffice 5.3.4.2 on Windows10
Re: average not showing 0 answer
An average is the summation of numbers entered, then divided by the quantity of numbers entered.
Since you have no entries, there is nothing for the summation or the division, thus the average function is trying to do division by zero (which is what that error is)
If you want the formula to return a blank when there are no entries, you could use
Since you have no entries, there is nothing for the summation or the division, thus the average function is trying to do division by zero (which is what that error is)
If you want the formula to return a blank when there are no entries, you could use
Code: Select all
=if(or(iserr(average(c7:c18));average(c7:c18)=0);"";average(c7:c18))
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Re: average not showing 0 answer
Or take advantage of the fact that when avg == 0, then sum==0 , and empty cells count as 0 for sum() as well:
Code: Select all
=IF(SUM(C7:C18)=0;"";AVERAGE(C7:C18))
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
W11 22H2 (build 22621), LO 7.4.2.3(x64)
Re: average not showing 0 answer
Code: Select all
=IF(COUNT(C7:C18)=0;"No values!";AVERAGE(C7:C18))
If there are specific reasons to suppress the result if it's 0, the following formula would do:
Code: Select all
=IF(COUNT(C7:C18)=0;"No values!";IF(SUM(C7:C18)=0;"";AVERAGE(C7:C18)))
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
Re: Average not showing 0 answer
Thanks for the quick replies you all!
And the solutions all work fine for me.
like this i'll be an expert in no time!?!!
Thanks
And the solutions all work fine for me.
like this i'll be an expert in no time!?!!
Thanks
LibreOffice 5.3.4.2 on Windows10