Hi "=IF(P5=AE5,"Y",Q5="")

It returns Y True , FalseThe "Y" seems to work

How can u change the True to Y and the False to NoMany Thanks

✔ Best Answer

I'm guessing you are looking for 2 conditions to be met, 1. P5=AE5

2 Q5 <> Blankif both are true then "Y" but if either is false then "N"

=if(AND(P5=AE5,Q5<>""),"Y","N")

That's a guess, you'll need to be clearer about exactly what all the conditions are and the results you want.

Hi It depends on where that formula is. If it is in Q5 then all you need is

=IF(P5=AE5,"Y","No")

If it is not in Q5 where is it and what are you trying to do with Q5?

Hi no its in V Q5 either Y or Blank

If P5=AE5 it returns Y

If p5 is not equal to AE5 it returns False

Finally if Q5 = "" it returns True

I need the true to say "Y" and the False to return "N"

Hope this makes sense

Many thanks

I'm not sure what you are trying to do. An IF statement has this syntax:

IF(logical_test, [value_if_true], [value_if_false])

In your case:

logical_test = P5=AE5

value_if_true = Y

value_if_false = Q5=""Therefore if P5=AE5 the value_if_true will be returned and you will get Y.

However, if P5<>AE5, the IF will return the value_if_false which in your case is essentially a question: Does Q5 = ""?

If P5<>AE5 and Q5 is empty, then you will get TRUE. If P5<>AE5 and Q5 is not empty, you will get FALSE.

What exactly are the conditions for which you want a Y or an N?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

I'm guessing you are looking for 2 conditions to be met, 1. P5=AE5

2 Q5 <> Blankif both are true then "Y" but if either is false then "N"

=if(AND(P5=AE5,Q5<>""),"Y","N")

That's a guess, you'll need to be clearer about exactly what all the conditions are and the results you want.

Ask Your Question

Weekly Poll

Do you think Google should sell budget phones in the US?

Discuss in The Lounge

Poll History