ifferror show 0

sam__gleeson

Board Regular
Joined
Oct 11, 2012
Messages
102
Hi

I have this formula for calculating %
Code:
=D25/(D$19*60)*100
It gives a #DIV/0! if a 0 in D25 so I used the following formula but it does not display a 0 if there is a error in the cell D25
Code:
=IFERROR(D25/(D$19*60)*100,"0")
D25 = Time in minutes
D$19 = 8 hours

Thanks
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi

Check again!

It gives #DIV/0! if there is 0 in D19.

The IFERROR works for me for the above and for alpha characters in D25.

hth
 
Upvote 0
Hi

I have the following....cell still empty with following
Code:
=D25/(D$19*60)*100

D25 = 0
D19 = 8

0/(8*60)*100 = 0/48000
 
Upvote 0
Hi

If D25 is "empty" (ie Null) the division coerces its value to zero.

If you have a space in D25, the formula in post 3 will show a "#VALUE!" error and the IFERROR formula will show a "0" in the left of the cell indicating - text.

I think now both my posts have catered for all eventualities.
 
Upvote 0

Forum statistics

Threads
1,203,685
Messages
6,056,732
Members
444,887
Latest member
cvcc_wt

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