View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default conditions in if statements

How about:
=IF(ISERR(G4/F4),0,G4/F4)

or even

=IF(F4=0,0,G4/F4)


"Roy Gudgeon" wrote:

Hi

=IFERROR(IF(G4/F41,F4/G4,G4/F4),1)
I'm using the above current formula to calculate some stock accuracy figures,
where f = computer stock & g = qty physically counted. The "iferror" deals
with 0/0 errors and reports 100%

My only issue comes when I have 0 computer stock but find some actual stock.
Applying this formula gives a 100% result when I actually need a 0% result.

I have tried using if (f4 = 0 & g41), ........to set a condition but this
only uses the 2nd statement as the true test and returns 100% when used in
the formula, any help greatly appreciated

thanks
Roy