## 逻辑公式

关键词:  逻辑公式

Formulas Description Examples
AND Syntax: AND(logical1, logical2, ...)
Returns TRUE if all of its arguments are TRUE.
=AND(A1,A2,A5)
=AND(A1:A3)
=AND(a1>10,b1="test")
FALSE Syntax: FALSE()
Returns the logical value FALSE
=FALSE()
IF Syntax: IF(test, then_value, otherwise_value)
Returns one value if a condition evaluates to TRUE and another value if it evaluates to FALSE.
Test is any value or expression that can be TRUE or FALSE.
Then_value is the value that is returned if the logical test is TRUE.
Otherwise_value is the value that is returned if the logical test is FALSE.
=IF(and(a1,a2), a5, a6)
=IF(a1>a2, a5, a6)
=IF(a1>=a2, "test", "test2")
IFERROR Syntax: IFERROR(test, value)
If the first argument is an error, then the second argument will be returned. If the first argument is not an error, then it will be returned.
=IFERROR(a1/a2, "error")
IFNA Syntax: IFNA(test, value)
If the first argument is an not available, then the second argument will be returned. Otherwise it will be returned.
=IFNA(a1/a2, "error")
NOT Syntax: NOT(logical)
Reverses the logic of its argument
=NOT(a1)
=NOT(a1>a2)
=NOT(a1="test")
OR Syntax: OR(logical1, logical2, ...)
Returns TRUE if any argument is TRUE
=OR(a1)
=OR(a1>10, a2>5)
=OR(a1>10,b1="test")
TRUE Syntax: TRUE()
Returns the logical value TRUE
=TRUE()