Data Preparation in Excel
Iason Prassides
Content Developer, DataCamp
AND()
OR()
NOT()
IF()
AND()
AND(logical1, [logical2], ...)
TRUE
if both conditions metFALSE
Example - Identify records where product is Pears and total revenue is over $2,500.
OR()
OR(logical1, [logical2], ...)
TRUE
if at least one condition metFALSE
Example - Identify records where product is Pears or total revenue is over $2,500.
NOT()
NOT(logical)
TRUE
when the opposite of the condition is trueFALSE
Example - Identify records where total revenue is $2,500 or less.
IF()
IF(logical_test, [value_if_true], [value_if_false])
IF plus AND functions
=IF(AND(logical1, [logical2], ...), [value_if_true], [value_if_false])
IF plus OR functions
=IF(OR(logical1, [logical2], ...), [value_if_true], [value_if_false])
IF plus NOT functions
=IF(NOT(logical), [value_if_true], [value_if_false])
=IF(logical_test, [value_if_true], IF(logical_test, [value_if_true], [value_if_false])
Data Preparation in Excel