0
0
Google Sheetsspreadsheet~5 mins

IF function in Google Sheets - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
The IF function helps you make decisions in your spreadsheet. It checks if something is true or false and then shows one result or another. This is useful when you want to sort or label data based on conditions.
When you want to mark students as Pass or Fail based on their scores.
When you need to give discounts only if the purchase amount is above a certain value.
When you want to show 'Yes' or 'No' if a task is completed or not.
When you want to highlight expenses that are over budget.
When you want to check if a date is before or after today.
Steps
Step 1: Click
- the cell where you want the result
The cell is selected and ready for input
Step 2: Type
- the formula bar
You start entering the IF formula
💡 Start with =IF(
Step 3: Enter
- the condition inside the parentheses
The condition to check is set, for example A2>50
Step 4: Type
- after the condition, separated by commas
The value to show if the condition is true is added, for example "Pass"
Step 5: Type
- after the true value, separated by a comma
The value to show if the condition is false is added, for example "Fail"
Step 6: Close
- the parentheses and press Enter
The formula calculates and shows the result based on the condition
Before vs After
Before
Column A has scores: 45, 78, 62, 30
After
Column B shows Pass or Fail: Fail, Pass, Pass, Fail based on scores above 50
Settings Reference
Logical_test
📍 Inside the IF formula parentheses
To check if the condition is true or false
Default: No default, must be specified
Value_if_true
📍 Inside the IF formula parentheses after the condition
To show this result when the condition is true
Default: No default, must be specified
Value_if_false
📍 Inside the IF formula parentheses after the true value
To show this result when the condition is false
Default: FALSE
Common Mistakes
Forgetting to put text results in quotes
Google Sheets treats unquoted text as cell references or errors
Always put text values inside double quotes, like "Pass" or "Fail"
Using wrong commas or semicolons as separators
Formula will show an error if separators are incorrect
Use commas to separate arguments in the IF function in Google Sheets
Not closing the parentheses
Formula will not calculate and show an error
Always close the IF function with a closing parenthesis )
Summary
The IF function checks a condition and returns one value if true and another if false.
You must write the condition, the true result, and the false result inside the formula.
Remember to use quotes for text results and commas to separate parts of the formula.