ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Supress error message (https://www.excelbanter.com/excel-discussion-misc-queries/892-supress-error-message.html)

Jim Anderson

Supress error message
 
I am using the formla:
=average(b35:b47)
to put the average of cells b35 to b47 into cell b48.
Is there a way to avoid the cell b48 showing the result :
#DIV/0!
when I have no entries in the range of aforementioned cells?
Thank you
Jim



Don Guillett

try this ARRAY formula which must be entered/edited with CSE
(ctrl+shift+enter)
=AVERAGE(IF(C1:C5<"",C1:C5))

--
Don Guillett
SalesAid Software

"Jim Anderson" wrote in message
...
I am using the formla:
=average(b35:b47)
to put the average of cells b35 to b47 into cell b48.
Is there a way to avoid the cell b48 showing the result :
#DIV/0!
when I have no entries in the range of aforementioned cells?
Thank you
Jim





Dave Peterson

Another way:

=IF(COUNT(B35:B47)0,AVERAGE(B35:B47),"")



Jim Anderson wrote:

I am using the formla:
=average(b35:b47)
to put the average of cells b35 to b47 into cell b48.
Is there a way to avoid the cell b48 showing the result :
#DIV/0!
when I have no entries in the range of aforementioned cells?
Thank you
Jim


--

Dave Peterson

Jim Anderson

Dave
Thank you very much!
This formula worked perfectly for me.
I appreciate your help very much.
Jim

"Dave Peterson" wrote in message
...
Another way:

=IF(COUNT(B35:B47)0,AVERAGE(B35:B47),"")



Jim Anderson wrote:

I am using the formla:
=average(b35:b47)
to put the average of cells b35 to b47 into cell b48.
Is there a way to avoid the cell b48 showing the result :
#DIV/0!
when I have no entries in the range of aforementioned cells?
Thank you
Jim


--

Dave Peterson





All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com