The IF function
Returns one value if a test is true and another if it is false.
In German Excel: WENN
How to write it
=IF(logical_test, value_if_true, [value_if_false])- logical_test
- A comparison like B2>=60.
- value_if_true
- What to show when it is true.
- value_if_false
- What to show when it is false.
๐ก Text in a test needs quotes: B2="Sales".
Try it
Did Monday beat the goal of 40 coffees? Show "Yes" or "No".
A
B
C
D
1
Day
Coffees
Goal
2
Mon
42
40
3
Tue
38
4
Wed
51
5
Thu
47
6
Fri
66
Compare B2 with the goal in D2.
Did Monday beat the goal of 40 coffees? Show "Yes" or "No".