Simple IF statement (hopefully!!)

J

Jamesy

Morning,

Just a quick one, how do I constuct the below...

A1 A2
0% 0%

I need a formula in A3 that will say "YES" if A1 and A2 =0%.

Many thanks,
James.
 
G

Guest

Hi
This depends on whether your cell is formatted as a percentage or text. Try:
=IF(A1=A2=0,"YES","")
or
=IF(A1=A2="0%","YES","")

Hope this helps.
Andy.
 
C

chalky

Personal i would use an AND() formula, ie:

=IF(AND(A1=0%,A2=0%),"Yes","")

thanks
Chris
 
G

Guest

That doesn't work!! I wonder why? Anyway, try these instead:
=IF(AND(A1=0,A2=0),"YES","")
or
=IF(AND(A1="0%",A2="0%"),"YES","")

Andy.
 
S

Sandy Mann

That doesn't work!! I wonder why?

I don't know if this is true - perhaps someone who knows about the inner
workings of Excel will be able to tell us - but perhaps XL is reading it
as:

=IF(A1=(A2=0),"YES","")

which would be the equivalent to:

=IF(0=TRUE,"YES","")

Therefore the FALSE argument is returned.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland

[email protected]
[email protected] with @tiscali.co.uk
 
S

Sandy Mann

Thinking about it again, (post first think afterwards <g>).....

I think that it is more likely that XL is interpreting it as:

=IF((A1=A2)=0,"YES","")

which of course would be:

=IF(TRUE=0,"YES","")

--

Sandy
In Perth, the ancient capital of Scotland

[email protected]
[email protected] with @tiscali.co.uk
 
Top