Do not display "#DIV/0!", default to 0?

VBA_Newbie

Active Member
Joined
Jan 7, 2005
Messages
258
Hi folks,

Instead of showing "#DIV/0!" when a formula has as the denominator a 0, to just show 0 instead in the cell? All other cells where the formula does not divide by 0 should simply display normally. Is it possible?

Many thanks!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
or you can also use

=if(iserror(a1/b1;0;a1/b1))
this formula cna be use to combine any other formula that can show you an error (n/a, valor!, etc) Is very useful!!
 
Upvote 0
or you can also use

=if(iserror(a1/b1;0;a1/b1))
this formula cna be use to combine any other formula that can show you an error (n/a, valor!, etc) Is very useful!!

Just a note that it can be potentially negative as it traps all errors and can lead you to assume that formulas are working properly when they're not.

It also forces 2x calculation, so for longer formulas it can start getting pretty expensive.

Smitty
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,539
Members
449,038
Latest member
Guest1337

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