IF Formula
The Problem with your formula is that you used a calculation that divides by
zero in order to find out if it devides by zero. When you run into an error
a small box with an exclimation mark appears. If you click on that and press
Show calculation steps you can see what the computer is doing each step.
Your calculation looks like this (I used 1 as F4 and 0 As H4)
=IF(1/0*1000,1/0*100,"")
=IF(#DIV/0*1000,1/0*100,"")
=IF(#DIV/00,1/0*100,"")
#DIV/0
The division by zero occured before it could find out if it would happen or
not. So the Error ate right through the formula. Miguels formula (
=IF(H4=0,F4/H4*100,"") ) Works well because it sees if H4 is a zero before it
does any division. Hopefully this explination will help you when you run
into similar Errors in the future.
"Bryan" wrote:
Thanks Everyone thats great all of the formulas worked well.
regards,
Bryan
"Mark Lincoln" wrote:
Try this:
=IF(H4<0,IF(F4/H4*1000,F4/H4*100,""),"")
|