Urgent - MS Excel Question

Trying to use the change the color of the text if the cell = #DIV!0… I presume that I am missing something… is there a conditional format that would give the same result as the “iserror” formula ?

Hmmm, actually I thought I remembered it could be done with a custom number format mask, changing the color of the text for a value of zero (since Dootsies first suggestion does indeed work).

However, upon experimenting, I can’t get it to work. Interesting.

kabbes, how do you do it? I’m stumped.

The problem is that it’s not a zero value - it’s a “#DIV!0” value…

I thought you could do it with some clever custom number masking too, but damned if I can make it work now. I might have another go at it later.

Just have to stick with the proper (i.e. IF()) solution after all :slight_smile:

Here’s another thought too: a custom function. Define the function DIV(a,b) in VBA:


Function Div(a,b)
     If b = 0 then Div = 0 else Div = a/b
end function

Then instead of using a/b you can use Div(a,b)

i.e. to divide cell A1 by A2 set cell A3 as “=Div(A1,A2)”

pan

Nice one Kabbes - seems like there are plenty of solutions to this… I think dootsie’s one was quickest and easiest…

Thanks all for the help…

:Happy Monkey: