# if / and statement - excel 2010

hi experts im trying to come up with a formula to do the following'

=IF(&(C12="",c9="","",C12/\$C\$9+0.001)

so what im trying to do here is;
if c12 and/ or c9 = "","" otherwise c12/\$c\$9+0.001)

byundt

membership
Create an account to see this answer
Signing up is free. No credit card required.
At the risk of being a trifle confusing, you can achieve the same result with:
=IF(C9&C12="","",C12/\$C\$9+0.001)
``=IF(AND(C9<>"",C12<>""),((\$C\$12/\$C\$9)+0.001),"")``
``=if(and(condition1, condition2), TrueResult, FalseResult)``
The original poster is after an AND/OR statement @byundt is correct as this will trap both conditions and is also using the correct functionality in his first post but shows a compatible syntax in his second post for older version of Excel.

@jagadishdulal only shows the syntax for if both cells were empty.
Unless I am still asleep, this
=IF(C9&C12="","",C12/\$C\$9+0.001)
appears to be the same as
=IF(AND(C9="",C12=""),"",C12/\$C\$9+0.001)
rather than
=IF(OR(C9="",C12=""),"",C12/\$C\$9+0.001)
@rorya lol I think its me that's half asleep yes you are correct :)
SOLUTION

membership
Create an account to see this answer
Signing up is free. No credit card required.