Hiding a #DIV/0! comment

B

Bob Smith

Hi folks, within another workbook, I track game data for our team. I have a
few columns where games have yet to be played and am showing the following
above error message as there is no data in the columns. Formula I'm using
is - =ROUNDDOWN(AVERAGE(K40:K45),0) .

Any suggestions on modifications so that I don't show the error message,
other than just changing the font to white font?

TIA,

Bob
 
E

E-Coder

You can trap the error and have Excel show nothing instead...

=IF(ISERROR(ROUNDDOWN(AVERAGE(K40:K45),0)),"",ROUNDDOWN(AVERAGE(K40:K45),0))
 
E

E-Coder

The previous formula will make the cell text or "". If you need it to be a
zero use...

=IF(ISERROR(ROUNDDOWN(AVERAGE(K40:K45),0)),0,ROUNDDOWN(AVERAGE(K40:K45),0))
 
B

Bob Smith

Works like a charm E-Coder ... TYVM! :)

Bob

E-Coder said:
The previous formula will make the cell text or "". If you need it to be a
zero use...

=IF(ISERROR(ROUNDDOWN(AVERAGE(K40:K45),0)),0,ROUNDDOWN(AVERAGE(K40:K45),0))
 
T

T. Valko

Try this:

=ROUNDDOWN(IF(COUNT(K40:K45),AVERAGE(K40:K45),0),0)

Returns 0 if the range doesn't contain any numbers.

Biff
 
B

Bob Smith

Thanks Biff, that works just as well as the other formula I received. Seems
yours is a bit cleaner (less code). I like less code :).

Regards,

Bob
 
T

T. Valko

You might be able to use this one:

=INT(IF(COUNT(K40:K45),AVERAGE(K40:K45)))

Biff
 
M

msmischief

you can simply hide the result by using a conditional format under format.
this saves you having to amend your original formula:

1. Select the cell that contains the error value (e.g. B2).
2. Select 'Format' > 'Conditional formatting'
3. From drop down box select 'Formula Is' and enter following formula;
=iserror(B2)
4. Select 'Format...' tab
5. Format the font colour to white and click ok (x2)
6. Copy the conditional format to the relevant cells by copy>paste
special>format

any error messages won't be visible.
 

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