Problem is displaying formula

S

Sathisc

Hi,

I am creating a report in which the avg is formulated. But when there
is no data entered in the column the solution shows #DIV/0!

for ex
I wanted to avg c23 to c27 i gave the formula
=AVERAGE(C23:C27)

when there is no data in c23 to c27 the display shows #DIV/0!

I dont want the msg to appear in the screen.

Help needed.
 
G

Gary''s Student

A very common problem. The usual approach is:

=IF(ISERROR(yourformula),"",yourformula))

so in your case:

=IF(ISERROR(AVERAGE(C23:C27)),"",AVERAGE(C23:C27))
 
D

Dave Peterson

You can look to see if there are any numbers in that range:

=if(count(c23:c27)=0,"No numbers yet",average(c23:c27))
 
P

Pecoflyer

Hi,
another possibility is =average(if(c23:c27><0,c23:c27,false))
entered as an array formula with Ctrl+Shift+Enter

Sathisc;333930 said:
Hi,

I am creating a report in which the avg is formulated. But when there
is no data entered in the column the solution shows #DIV/0!

for ex
I wanted to avg c23 to c27 i gave the formula
=AVERAGE(C23:C27)

when there is no data in c23 to c27 the display shows #DIV/0!

I dont want the msg to appear in the screen.

Help needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top