Returning Text or Numbers From IF
Show custom messages or calculated values based on a condition.
IF Can Return Anything
You have built solid tests. Now let's focus on the two outcomes IF returns.
An IF result can be a piece of text, a number, a blank cell, or even another calculation. Choosing the right kind of output makes your sheet clear and useful.
Returning Text Messages
To show words, wrap each outcome in double quotes. The quotes tell the spreadsheet "treat this as literal text".
For a payment status in A2:
Without the quotes the spreadsheet would think "Paid" is a name or formula and likely show an error.
=IF(A2 = "Y", "Paid", "Unpaid")All lessons in this course
- How the IF Function Thinks
- Comparing Values With Operators
- Returning Text or Numbers From IF
- Common IF Mistakes to Avoid