Using IF function
The IF function is one of the most popular functions in Excel, and it allows you to make logical comparisons between a value and what you expect.
So an IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False.
IF Function Syntax: =IF(logical_test, value_if_true, value_if_false)
- logical_test → The condition you want to check.
- value_if_true → What to return if the condition is TRUE.
- value_if_false → What to return if the condition is FALSE.
For example
=IF(C2>B2,”Over Budget”,”Within Budget”)
In the above example, the IF function in E2 is saying IF(C2 Is Greater Than B2, then return “Over Budget”, otherwise return “Within Budget”)
Steps
1. Click on an empty cell
Empty Cell
2. Type the formula
Type the formula
3. Press Enter to get the result
Results
4. Copy the formula down
- Move your mouse to the small square in the bottom-right corner of cell E2.
-
Drag it down to fill E3 through E5.
Copy Formula
-