#DIV/0 error how to hide

jaiD

Board Regular
Joined
Jun 13, 2004
Messages
92
Hi how do i hide as blank or show as 0 or something if a calculation is unable to take place. for example.

a1 = 2
a2 = 4

i am doing a calculation to work out the % which is =a4/a2 which equals 50%.

but when the following happens

a1 = 0
a2 = 0

i get the following result #div/o i don't want it to show this but instead be blank or show 100% or 0%
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Greetings.

I'd use something like:

=IF(ISERR(C28/C29),"ERROR",C28/C29)
or
=IF(ISERR(C28/C29),"",C28/C29)
if you didn't want anything to show...

HTH,
Jim
 
Upvote 0
Hello!

Use conditional formatting to change the font color to the same color as the worksheet. The DIV/#0 will still be there but not visible.

I've seen some very good posts regarding conditional formatting. Try a search for this.
 
Upvote 0
Think I may encounter problems with this as the following is the data

I need it to say 100% if the following

Submitted Pass Fail
1 1

& if the following i want it to say 0%

Submitted Pass Fail
1 1

& if the following i want it to say 50%

Submitted Pass Fail
2 1


submitted column is A
Pass is B
Fail is C
 
Upvote 0
jaiD said:
Think I may encounter problems with this as the following is the data

I need it to say 100% if the following

Submitted Pass Fail
1 1

& if the following i want it to say 0%

Submitted Pass Fail
1 1

& if the following i want it to say 50%

Submitted Pass Fail
2 1


submitted column is A
Pass is B
Fail is C

What if Submitted = 2 and Fail = 1?
 
Upvote 0
yes sorry the figures should have had a space between them with 1 being under submitted and 1 under fail etc...
 
Upvote 0

Forum statistics

Threads
1,215,008
Messages
6,122,672
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top