ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   AND function in Excel (https://www.excelbanter.com/excel-worksheet-functions/40468-function-excel.html)

Big Jones

AND function in Excel
 
Can someone help me with a logic test using the AND function.
IF(A2=A3,A10 AND D2=D3,C5)

The above is what I am trying to achieve, can someone show me how to do it
correctly.
Thanx
BJ

David Billigmeier

I'm a little confused if you want the A2=A3 to be included in the AND
statement, and also don't know what you want to display if the conditions are
not met (I think you want the value in C5 to display if the conditions are
met?) Here is the formula if you want the value in C5 to display if 3
conditions are satisfied:

=IF(AND(A2=A3,A10=D3,D2=D3),C5,"")

Reply a little more specifically if this isn't what you were after,
--
Regards,

David Billigmeier



"Big Jones" wrote:

Can someone help me with a logic test using the AND function.
IF(A2=A3,A10 AND D2=D3,C5)

The above is what I am trying to achieve, can someone show me how to do it
correctly.
Thanx
BJ


Bernard Liengme

The syntax is IF(AND(A2=A3,A2=A10,D2=D3,D2=C5))
I am guessing that your A2=A3,A10 means A2 must equal both A3 and A10
Since AND is a function we must use NAME (argument1, argument2,....)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Big Jones" <Big wrote in message
...
Can someone help me with a logic test using the AND function.
IF(A2=A3,A10 AND D2=D3,C5)

The above is what I am trying to achieve, can someone show me how to do it
correctly.
Thanx
BJ




John Michl

This logic doesn't make sense to me so I'm not quite sure what you are
trying to accomplish. The AND function is structured differently. It
should be AND(first criteria, second criteria). This would return a
TRUE if both criteria are TRUE.

Using AND you could check if both criteria are true but it is not clear
from your logic what the resulting value should be (A10 or C5). For
example,
IF(AND(A2=A3,D2=D3),A10,C5) . In this example, if both are true it
would return the value of A10. If one of them is false then it would
return the value of C5.

Does that help?

- John


Big Jones

Eureka! I'm glad someone understands what I'm doing, even if I don't.
Many thanx

"John Michl" wrote:

This logic doesn't make sense to me so I'm not quite sure what you are
trying to accomplish. The AND function is structured differently. It
should be AND(first criteria, second criteria). This would return a
TRUE if both criteria are TRUE.

Using AND you could check if both criteria are true but it is not clear
from your logic what the resulting value should be (A10 or C5). For
example,
IF(AND(A2=A3,D2=D3),A10,C5) . In this example, if both are true it
would return the value of A10. If one of them is false then it would
return the value of C5.

Does that help?

- John




All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com