0
0
Excelspreadsheet~5 mins

Formula-based rules in Excel - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
Formula-based rules let you change how cells look based on their values or other cells. This helps you spot important data quickly without checking each cell one by one.
When you want to highlight sales numbers above a target automatically.
When you need to mark overdue dates in a list of tasks.
When you want to color code expenses that are higher than average.
When you want to show which students scored below passing grade in a test.
When you want to flag duplicate entries in a list.
Steps
Step 1: Select
- the cells you want to apply the rule to
The selected cells are highlighted ready for formatting
Step 2: Click
- Home tab > Conditional Formatting dropdown
A menu with formatting options appears
Step 3: Choose
- New Rule from the Conditional Formatting menu
The New Formatting Rule dialog box opens
Step 4: Select
- Use a formula to determine which cells to format option
A formula input box appears
Step 5: Type
- the formula box
The formula is ready to check each cell for the condition
💡 Start your formula with = and use relative or absolute references as needed
Step 6: Click
- Format button
The Format Cells dialog opens to choose colors, fonts, or borders
Step 7: Choose
- desired formatting options (like fill color)
The preview shows how cells will look when the rule applies
Step 8: Click
- OK in Format Cells dialog, then OK in New Formatting Rule dialog
The formula-based rule is applied and cells change appearance if they meet the condition
Before vs After
Before
Cells A1:A10 have numbers from 1 to 10 with no special formatting
After
Cells A1:A10 show a green fill only for numbers greater than 5 based on the formula =A1>5
Settings Reference
Formula input box
📍 New Formatting Rule dialog
Defines the condition to check for each cell
Default: Empty
Format button
📍 New Formatting Rule dialog
Sets how cells look when the formula condition is TRUE
Default: No formatting
Applies to range
📍 Conditional Formatting Rules Manager
Specifies which cells the rule affects
Default: Selected cells
Common Mistakes
Typing a formula without starting with =
Excel does not recognize it as a formula and the rule will not work
Always start your formula with =, for example =A1>5
Using absolute references ($A$1) incorrectly
The rule applies the same cell reference to all cells, causing wrong results
Use relative references (A1) or mixed references carefully to apply the rule correctly across cells
Applying the rule to the wrong cell range
Cells outside the intended range will not format or wrong cells will format
Select the correct cells before creating the rule or adjust the Applies To range in the Rules Manager
Summary
Formula-based rules let you format cells automatically based on conditions you set with formulas.
You create these rules by selecting cells, choosing New Rule, and typing a formula that returns TRUE or FALSE.
Remember to start formulas with = and use correct cell references for the rule to work as expected.