IF, AND

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear All,

I'm trying to use theIF function as following =IF(And
(y=0,z=0),x,z), but the -AND- logical test isn't working. The formula part of
the true value is implemented even if the y=0 or z=0 not both of them.

Is there any help.
--
*********
IT Manager
DeLaval Ltd.
Cairo-Egypt
*********
|-----------------------------|
|Islam is peace not Terror|
|-----------------------------|
 
Hi,
Not sure if the problem lies in the format of the numbers (i.e. text)? Have
you tested it?
Cheers,
Jon
 
Hi Yes i tested the following exactly:
=IF(AND($A$11=0,B4=0),"",(D4-$A$11)/$A$11)

But now the formula part [(D4-$A$11)/$A$11] works even if only one of the
two conditions [($A$11=0,B4=0)] is true. I think the folrmula shouldn't work
until the both conditions after AND are true.
 
Also, are y and z named ranges or are you really using cell references?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Your reasoning is correct. Whilst the cells A11 and B4 look empty, are you
sure that they do not contain spaces(s). Do a =LEN(A11) and =LEN(B4)
somewhere, if they are not both 0, that is the problem.

Your formula also has a problem if B4 is not 0, but a11 is, as it returns a
#DIV/0! error (dividing by 0 - A11).

--

HTH

RP
(remove nothere from the email address if mailing direct)


Ibrahim Awwad said:
Hi Yes i tested the following exactly:
=IF(AND($A$11=0,B4=0),"",(D4-$A$11)/$A$11)

But now the formula part [(D4-$A$11)/$A$11] works even if only one of the
two conditions [($A$11=0,B4=0)] is true. I think the folrmula shouldn't work
until the both conditions after AND are true.

Springbok said:
Hi,
Not sure if the problem lies in the format of the numbers (i.e. text)? Have
you tested it?
Cheers,
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Out of office assistant 1
Field Customization 1
Mail headers and details 5
Domain Configuration 1
Icons 3
Cell Colour 10
RUNAS 2
Install & Uninstall remotely 2

Back
Top