0
0
Excelspreadsheet~5 mins

IF function in Excel - 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, then shows one result if true and another if false. This is useful for sorting data or creating simple rules.
When you want to mark students as Pass or Fail based on their scores
When you need to give discounts only if a purchase amount is above a certain value
When you want to show 'Yes' or 'No' depending on whether a task is complete
When you want to check if a date is before or after today and show a message
When you want to highlight if sales targets are met or not
Steps
Step 1: Click
- a cell where you want the result
The cell is selected and ready for typing
Step 2: Type
- the selected cell
The formula starts to appear in the formula bar
💡 Start with an equal sign = to tell Excel you are entering a formula
Step 3: Type
- the formula bar
The IF formula is written with the condition, true result, and false result
💡 Use this format: =IF(condition, value_if_true, value_if_false)
Step 4: Press
- Enter key
The cell shows the result based on the condition
Before vs After
Before
Cell A1 contains 75, and cell B1 is empty
After
In cell B1, the formula =IF(A1>=60, "Pass", "Fail") shows 'Pass'
Settings Reference
Logical_test
📍 First argument in IF formula
This is the condition Excel checks
Default: No default, must be provided
Value_if_true
📍 Second argument in IF formula
What Excel shows if the condition is TRUE
Default: No default, must be provided
Value_if_false
📍 Third argument in IF formula
What Excel shows if the condition is FALSE
Default: No default, must be provided
Common Mistakes
Forgetting to start the formula with =
Excel will treat it as text, not a formula
Always begin your formula with an equal sign =
Not putting text results inside quotes
Excel will not recognize text without quotes and show an error
Put text results inside double quotes, like "Pass" or "Fail"
Using incorrect commas or parentheses
Formula will not work and show an error
Use commas to separate arguments and match all parentheses
Summary
The IF function checks a condition and returns one value if true, another if false.
You must write the condition, true result, and false result inside the formula.
Remember to use = at the start and quotes around text results.