Conditional formatting changes how a cell looks based on its value

Conditional formatting is a tool in Excel that automatically changes the color, font, or appearance of a cell depending on what number or text is inside it. If you set a rule that says "turn this cell red when the value is over 100," Excel will watch that cell and apply the red background the moment the value crosses 100. You do not have to manually color cells — the formatting updates on its own.

This is useful when you are tracking sales targets, monitoring inventory levels, or spotting which students passed or failed a test. Instead of scanning a spreadsheet row by row, the colors jump out at you immediately.

Key Takeaways

  • Select the cells you want to format first, then go to the Home tab and click Conditional Formatting to set up a rule.
  • Choose a rule type — highlight cells that are greater than a number, less than a number, between two numbers, or contain specific text.
  • Pick the formatting you want applied (background color, font color, or a preset style) and click OK to activate the rule.
  • Once a rule is set, it stays active and updates automatically whenever the cell values change.
  • You can create multiple rules on the same cells, and Excel will apply all of them if their conditions are met.

Select your cells before you open the conditional formatting menu

The first step is to tell Excel which cells should have conditional formatting. Click on the first cell you want to format, then drag to select all the cells in that range. If the cells are not next to each other, hold Ctrl (or Cmd on Mac) and click each cell individually to add it to your selection.

You can select a single cell, a row, a column, or a block of cells — it does not matter. Excel will apply the same rule to every cell you have selected. If you select too many cells by accident, just click somewhere else to start over and select again.

Open the conditional formatting menu and choose a rule type

With your cells selected, go to the Home tab at the top of Excel. Look for the Conditional Formatting button — it is usually in the middle-right area of the ribbon. Click it and a dropdown menu will appear with options like "Highlight Cell Rules," "Top/Bottom Rules," and "New Rule."

For most common tasks, click Highlight Cell Rules. This opens a submenu with preset options: "Greater Than," "Less Than," "Between," "Equal To," and "Text that Contains." Pick the one that matches what you want to watch for. If none of these fit your situation, go back and click New Rule instead to build a custom rule from scratch.

Enter the value or text you want Excel to watch for

After you pick a rule type, a dialog box will pop up asking you to enter a number, text, or range. For example, if you chose "Greater Than," the box will ask you to type the number you want to compare against. Type 100 if you want to highlight all cells with values over 100. If you chose "Text that Contains," type the word or phrase you are looking for — like urgent or overdue.

Some rule types ask for two values. If you chose "Between," you will see two boxes: one for the lower number and one for the upper number. Fill in both. You can also click the small icon next to the text box to select a cell range instead of typing a number — this is useful if your threshold is in another cell that changes.

Choose the formatting style and apply the rule

Once you have entered your value or text, Excel shows you a preview of how the cell will look when the rule is triggered. You will see options like "Light Red Fill," "Light Green Fill," "Yellow Fill," or "Custom Format." Click the one you want. If you want something different — like bold text instead of a colored background — click Custom Format to open more options.

When you are happy with how it looks, click OK. Excel applies the rule immediately to all the cells you selected. Any cell that meets the condition will be formatted right away. If you change a cell's value later, the formatting updates automatically.

Create multiple rules on the same cells

You can set up more than one conditional formatting rule on the same cells. For example, you might want cells over 100 to turn green and cells under 50 to turn red. Just select the cells again, open Conditional Formatting, and add a second rule. Excel will apply both rules at the same time.

If two rules conflict — for instance, both say to color the cell, but in different colors — Excel applies the rule you created first. You can change the order of your rules by going to Conditional Formatting and clicking Manage Rules. This opens a list of all the rules you have created. Click and drag to reorder them, or delete any rule you no longer need.

Edit or remove a rule you have already created

To change a rule after you have set it up, select the cells that have the rule, open Conditional Formatting, and click Manage Rules. You will see a list of every rule applied to those cells. Click the rule you want to edit and click Edit Rule. Change the value, the text, or the formatting, then click OK.

To delete a rule entirely, select it in the Manage Rules list and click Delete Rule. The formatting will disappear from your cells immediately. If you only want to turn off a rule temporarily without deleting it, you can uncheck the box next to the rule name instead of deleting it.

Frequently Asked Questions

Can I use conditional formatting on a column that has formulas in it?

Yes. Conditional formatting works on any cell, whether it contains a number you typed, a formula result, or text. The rule watches the final value in the cell, not how that value got there.

What happens to conditional formatting when I copy and paste cells?

When you copy a cell with conditional formatting and paste it elsewhere, the formatting comes along with it. The rule adjusts automatically to apply to the new cells. If you want to paste only the values without the formatting, use Paste Special and uncheck the Formats option.

Can I use a formula in a conditional formatting rule?

Yes, but only if you choose New Rule and select Use a Formula to Determine Which Cells to Format. This lets you write a formula that returns TRUE or FALSE. When the formula is TRUE, the formatting applies. This is more advanced but gives you much more control.

Why is my conditional formatting not showing up?

The most common reason is that the cells do not actually meet the condition you set. Double-check the value or text you entered in the rule. Also check that you selected the right cells. If the rule is there but the formatting is not visible, try clicking Manage Rules and making sure the rule is not unchecked.

Can I copy a conditional formatting rule to other cells without selecting them manually?

Yes. Select a cell that already has the rule you want to copy, then use the Format Painter tool (the paintbrush icon on the Home tab). Click it once, then click and drag across the cells where you want the rule to apply. The rule will copy over to those cells.