ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   =If (need 2 criterias), true, false (https://www.excelbanter.com/excel-worksheet-functions/73114-%3Dif-need-2-criterias-true-false.html)

serve

=If (need 2 criterias), true, false
 
=IF(a=b and c=d, place value for true, place value for false). I need to
have 2 criteria in the logical section, right now you can only use 1 logical
statement

Sloth

=If (need 2 criterias), true, false
 
=IF(AND(a=b,c=d),TRUE,FALSE)

or

=IF((a=b)*(c=d),TRUE,FALSE)

"serve" wrote:

=IF(a=b and c=d, place value for true, place value for false). I need to
have 2 criteria in the logical section, right now you can only use 1 logical
statement


serve

=If (need 2 criterias), true, false
 
Thank you.
next scenario, if you are trying to match A with all of column B (meaning
that value should equal a cell in column B) and match C with all of column D
(same as column B), TRUE, FALSE.... can we do that, like comparing to an
array?

"Sloth" wrote:

=IF(AND(a=b,c=d),TRUE,FALSE)

or

=IF((a=b)*(c=d),TRUE,FALSE)

"serve" wrote:

=IF(a=b and c=d, place value for true, place value for false). I need to
have 2 criteria in the logical section, right now you can only use 1 logical
statement


Sloth

=If (need 2 criterias), true, false
 
=IF((COUNTIF(B:B,A1)0)*(COUNTIF(D:D,C1)0),TRUE,F ALSE)

your nomenclature is a little funny, but I think I understand what you want.
If A1 is found at least once in column B, and C1 can be found at least once
in column D, then this statement will return true.

You might want to start a new post detailing this question if I am not
understanding you correctly. Be sure to provide a sample of the data you
have, and the results you want. Be as detailed as possible.

For Example:
A B C D E
1 apple orange red red TRUE
2 orange apple yellow duck FALSE
3 banana apple purple purple FALSE
4 pineapple pineapple duck blue TRUE

E1 is TRUE because "apple" can be found in column B, and "red" can be found
in column D.
E2 is FALSE because "yellow" can not be found in column D.
E3 is FALSE because "banana" can not be found in column B.

"serve" wrote:

Thank you.
next scenario, if you are trying to match A with all of column B (meaning
that value should equal a cell in column B) and match C with all of column D
(same as column B), TRUE, FALSE.... can we do that, like comparing to an
array?

"Sloth" wrote:

=IF(AND(a=b,c=d),TRUE,FALSE)

or

=IF((a=b)*(c=d),TRUE,FALSE)

"serve" wrote:

=IF(a=b and c=d, place value for true, place value for false). I need to
have 2 criteria in the logical section, right now you can only use 1 logical
statement



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

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