View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default If AND Statement

What you need is this:

=IF(AND(A1=0,A2=0),0,A1/A2)

Hope this helps.

Pete

Lost and Looking for Help wrote:
I have a number in Cell A1 and A2 for example.

I want a formula that says, that IF A1 and A2 are both Zero, then to place a
zero in the the cell, if false divide A1/A2. Here is the formula i used but
it obviously doesn't work

=IF(A1=0 and A2=0,0,A1/A2)