
Boolean Operators in IF function (Excel)
I'm trying to do something in Excel that seems quite basic, but I can't get
it to work. I'm trying to use a Boolean operator (AND) in an IF function.
It looks like this:
=IF(C7="N" AND G7="E", 10, 100)
Is there some reason you can't make an IF function contingent on 2
conditions by using the AND? I didn't see any examples in the HELP showing
Boolean operators.
TIA

Ron Wilson

Re: Boolean Operators in IF function (Excel)
In Excel, AND is a function, not an operator
=IF( AND(C7="N",G7="E"), 10, 100)
Alternately, 0 corresponds to FALSE, so you can do it with arithmetic
=IF( (C7="N")*(G7="E"), 10, 100)
(you would use + for OR)
Jerry
Ron Wilson wrote:
> I'm trying to do something in Excel that seems quite basic, but I can't get
> it to work. I'm trying to use a Boolean operator (AND) in an IF function.
> It looks like this:
>
> =IF(C7="N" AND G7="E", 10, 100)
>
> Is there some reason you can't make an IF function contingent on 2
> conditions by using the AND? I didn't see any examples in the HELP showing
> Boolean operators.
>
> TIA
>
> 
> Ron Wilson