Logical
Google Sheets: Logical
Categories:
IF()
IF(
logical_expression
,value_if_true
,value_if_false
)
Returns one value if a logical expression is TRUE
and another if it is FALSE
.
function | result |
---|---|
=IF(1=1, “True_Value”, “False_Value”) | True_Value |
=IF(-1>0, “Greater”, “Smaller”) | Smaller |
=IF(“Google”=“google”, “Equal”, “Unequal”) | Equal |
=IF(TRUE, , “False”) | |
=IF(FALSE, “True”, ) | |
=IF( IF(1>0, TRUE, FALSE), “Nested_Outcome”, IF(TRUE, “Reached”, “Unreached”) ) | Nested_Outcome |
IFS()
IFS(
condition1
,value1
, [condition2
,value2
, …])
Evaluates multiple conditions and returns a value that corresponds to the first true condition.
A | B | C | |
---|---|---|---|
1 | Score | Grade | Formula |
2 | 88 | B | =IFS(A2 > 90, “A”, A2 > 80, “B”) |
3 | 92 | A | =IFS(A3 > 90, “A”, A3 > 80, “B”) |
4 | 65 | #N/A | =IFS(A4 > 90, “A”, A4 > 80, “B”) |
All Logical Function
- AND function
- FALSE
- IF function
- IFS function
- IFERROR
- IFNA function
- NOT
- OR function
- TRUE
- SWITCH
- XOR function