1) I would change Anthony's suggestion to =If(sum(a2,b2)=0,1,a2/b2)
since you want the answer to be 1 ONLY when both a2 and b2 are equal to zero. If b2=0 and a2=5, you would want ??????? (Maybe #NA ??)
2) More importantly, and this is a common refrain from me and some others on this board, you should find out if there is any underlying issue that is causing b2 to be equal to zero. It is not clear to me, LH's rule aside, that you should want to "mask" divide by zero problems. It is like pain - usually it is telling you something that you should want to know.