New to Excel and not familiar with the formulas? Some can make your tasks much easier. 

The formulas developed are:

IF

This formula works in the way of If So… If not.
It allows you to test a condition and respond to it.

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

In the following example, we want to display Yes, if the gender is a Female.

The allows you to return text and not a formula.

The IF function can be nested with another IF function up to 64 levels.

AND

AND allows you to add multiple arguments.

Combined with the IF function, AND allows multiple conditions to be checked at the same time.

All conditions must be true for the result to be true.

=AND(logical1, [logical2], …)

In the example above, it is asked to display YES if the gender is Female AND the country is France.

Values returned by the AND operator.

Logical 1 Logical 2 Result
FALSE FALSE FALSE
FALSE TRUE FALSE
TRUE FALSE FALSE
TRUE TRUE TRUE

 

OR

OR allows you to choose between several arguments.

Combined with the IF function, OR allows 1 or more conditions to be checked at the same time.

At least 1 condition must be true for the result to be true.

=OR(logical1, [logical2], …)

In the example above, it is asked to display Yes if the gender is a Female OR the country is France.

Logical 1 Logical 2 Result
FALSE FALSE FALSE
FALSE TRUE TRUE
TRUE FALSE TRUE
TRUE TRUE TRUE

 

XOR

XOR allows you to choose between several arguments.

Combined with the IF function, XOR allows you to check 1 of many.

1 or more conditions must be true for the result to be true. On the other hand, if all the conditions are true, the result will be false.

=XOR(logical1, [logical2], …)

In the example above, it is asked to display YES if the gender is a Femal OR if the country is France. But not both.

Logical 1 Logical 2 Result
FALSE FALSE FALSE
FALSE TRUE TRUE
TRUE TRUE TRUE
TRUE TRUE FALSE