Back to Blog

How to Use Conditional Formatting in Excel: Step-by-Step Guide | SheetXAI

D
David DeSouza
Dec 1, 2025
Vector illustration showing two side-by-side panels with colored grid blocks and checkmarks, representing cells changing color based on values or formatting rules

The Problem

You have data in Excel and want to quickly identify important information - like highlighting sales above a target, dates that are overdue, or values that stand out. Conditional formatting automatically changes cell colors, fonts, or borders based on rules you set.

The Easy Way: Use SheetXAI

If you don't want to manually set up conditional formatting rules, the fastest way is to simply ask SheetXAI.

With SheetXAI, you can open the sidebar and type:

Highlight all cells in column B that are greater than 1000 in green.

SheetXAI will instantly apply conditional formatting for you, handling all the rules and colors automatically. You can create complex formatting rules with simple commands.

The Manual Way: Step-by-Step Instructions

To apply conditional formatting manually in Excel, follow these steps:

Step 1: Select Your Data

  1. Select the cells you want to format
  2. You can select:
    • A single cell
    • A range of cells
    • An entire column or row
    • Multiple ranges (hold Ctrl/Cmd while selecting)

Step 2: Open Conditional Formatting

  1. Click the Home tab in the ribbon
  2. Click Conditional Formatting in the Styles group
  3. A menu will appear with formatting options

Step 3: Choose a Formatting Rule

Excel offers several built-in rules:

Highlight Cells Rules:

  • Greater Than: Highlight cells above a value
  • Less Than: Highlight cells below a value
  • Between: Highlight cells within a range
  • Equal To: Highlight cells matching a value
  • Text That Contains: Highlight cells containing specific text
  • A Date Occurring: Highlight dates (today, yesterday, this week, etc.)
  • Duplicate Values: Highlight duplicate or unique values

Top/Bottom Rules:

  • Top 10 Items: Highlight top N values
  • Top 10%: Highlight top percentage
  • Bottom 10 Items: Highlight bottom N values
  • Bottom 10%: Highlight bottom percentage
  • Above Average: Highlight values above average
  • Below Average: Highlight values below average

Data Bars:

  • Add colored bars inside cells proportional to values

Color Scales:

  • Apply color gradients (green-yellow-red) based on values

Icon Sets:

  • Add icons (arrows, traffic lights, flags) based on values

Step 4: Set Up the Rule

  1. Choose a rule type (e.g., "Greater Than")
  2. Enter the criteria (e.g., enter "1000")
  3. Choose a format:
    • Light Red Fill with Dark Red Text: Default option
    • Custom Format...: Create your own format
  4. Click OK

Step 5: Customize Format (Optional)

To create custom formatting:

  1. In the rule dialog, click Custom Format...
  2. Choose formatting options:
    • Number: Format numbers (currency, percentage, etc.)
    • Font: Change font style, size, color
    • Border: Add cell borders
    • Fill: Change background color
  3. Click OK

Step 6: Manage Rules

To view or edit existing rules:

  1. Click HomeConditional FormattingManage Rules
  2. You'll see all rules for the current selection or sheet
  3. Edit: Modify an existing rule
  4. Delete: Remove a rule
  5. New Rule: Add another rule
  6. Use up/down arrows to change rule priority

Common Conditional Formatting Examples

Highlight Values Above a Threshold

  1. Select your data
  2. HomeConditional FormattingHighlight Cells RulesGreater Than
  3. Enter the threshold (e.g., 1000)
  4. Choose a format
  5. Click OK

Highlight Duplicates

  1. Select your data
  2. HomeConditional FormattingHighlight Cells RulesDuplicate Values
  3. Choose "Duplicate" or "Unique"
  4. Choose a format
  5. Click OK

Color Scale (Heat Map)

  1. Select your data
  2. HomeConditional FormattingColor Scales
  3. Choose a color scheme (e.g., Green-Yellow-Red)
  4. Cells will be colored based on their values

Data Bars

  1. Select your data
  2. HomeConditional FormattingData Bars
  3. Choose a color scheme
  4. Bars will appear in cells proportional to values

Icon Sets

  1. Select your data
  2. HomeConditional FormattingIcon Sets
  3. Choose an icon set (e.g., 3 Arrows, Traffic Lights)
  4. Icons will appear based on values

Using Formulas in Conditional Formatting

For more complex rules, use formulas:

  1. Select your data
  2. HomeConditional FormattingNew Rule
  3. Choose Use a formula to determine which cells to format
  4. Enter your formula (e.g., =B2>AVERAGE($B$2:$B$100))
  5. Click Format to set the formatting
  6. Click OK

Example: Highlight cells where the value is above the average of the column.

Common Mistakes to Avoid

  1. Selecting wrong range: Make sure you select the cells you actually want to format
  2. Using relative references incorrectly: In formula rules, be careful with $ signs
  3. Too many rules: Too many conditional formatting rules can slow down Excel
  4. Conflicting rules: Multiple rules on the same cells can conflict - check rule priority
  5. Not testing rules: Always verify that your rules work as expected

Tips for Better Conditional Formatting

  • Use color scales for trends: Great for spotting patterns in data
  • Use data bars for comparisons: Easy to see relative values at a glance
  • Combine rules: Apply multiple rules to the same cells for complex formatting
  • Use formulas: For advanced conditions, use formula-based rules
  • Manage rules: Regularly review and clean up unused rules
  • Use SheetXAI for complex rules: For complex conditional formatting, SheetXAI can set it up automatically

Copying Conditional Formatting

To copy conditional formatting to other cells:

  1. Select the cell with the formatting
  2. Click Format Painter (Home tab)
  3. Click and drag over the cells you want to format

Or:

  1. Select source cell → Copy (Ctrl+C)
  2. Select destination cells
  3. Paste SpecialFormats

Clearing Conditional Formatting

To remove conditional formatting:

  1. Select the cells
  2. HomeConditional FormattingClear Rules
  3. Choose:
    • Clear Rules from Selected Cells
    • Clear Rules from Entire Sheet

Conclusion

Now you know how to use conditional formatting in Excel manually. It's a powerful way to visualize data and spot important information quickly.

But for those times when you need to apply complex formatting rules or format multiple ranges, SheetXAI can apply conditional formatting automatically with simple commands, saving you time and ensuring consistent formatting.

Boost your productivity today.
Start automating your spreadsheets.

Join thousands of professionals saving hours every week. No credit card required to start.

Learn more