IF(logical_test, value_if_true, value_if_false)

Returns the value based on a condition you specify.

logical_testThe value or expression that can be evaluated to True or False.
value_if_trueThe value that is returned if "logical_test" is True.
value_if_falseThe value that is returned if "logical_test" is False.


* This function is not case sensitive.
* You can nest up to 64 IF functions.
* If "value_if_true" is left blank, then
* If "value_if_false" is left blank, then
* If you use text arguments, the match must be exact, except for case.
* This function can return an array formula.
* You can use the IFS function to return a value based on multiple conditions.
* For an illustrated example refer to the page under Advanced Functions.
* For the Microsoft documentation refer to support.office.com

1=IF(50<100,"value less than 100","value greater than 100") = value less than 100
2=IF(5=5,"5","10") = 5
3=IF(5=10,"5","10") = 10
4=IF(5=10,"","0") = 0
5=IF(TRUE,) = 0
6=IF(FALSE,) = False
7=IF(FALSE,"text if true","text if false") = text if false
8=IF(TRUE,50,100) = 50
9=IF(SUM(A2:A5)>0,SUM(A2:A5),SUM(A2:A5)) = 0
10=IF(AND(5=5,10-10),"true","false") = false
11=IF(2=1,1,IF(3=2,2,IF(4=3,3,IF(5=4,4,IF(6=5,5,IF(7=6,6,IF(8=7,7,100))))))) = 100

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top