View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default IF statement with AND or OR?

Try:

=IF(A10,"Dropped",IF(A20,"Fail","Pass"))

However this will return Pass id both cells are empty

To avoid this use:

=IF(OR(A1="",A2=""),"",IF(A10,"Dropped",IF(A20," Fail","Pass")))

This still assumes that no cell will hold a negative value.


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Colin" wrote in message
...
Hi,

I have a range of cells a1:a3.
In a1 I will have a number between 0 - 5.
In a2 I will have a number between 0 - 5.
In a3 I want a function that returns "Fail" if a2 is above 0, and
"Dropped"
if a1 is above 0 irrelevant to what number is in a2. ie: a number above 0
in
a1 will always return "Dropped" no matter what number is a2.
If a1 and a2 are both at 0 then "Pass" will be returned.

My starting point is =IF(A20,"Fail","Pass").

Please can you help?
--
Thank you,

Colin.