Conditional Format Highlight Row: Full Guide

How-to basics · Updated November 22, 2026

Yes, you can highlight an entire row with conditional formatting in Excel by basing the rule on a formula that references the row’s key cell, then applying the format to the whole row range. The standard approach is: select the rows you want to format, go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format, enter a formula like =$A2="Paid", click Format to set a fill color, and press OK. This works in Excel for Microsoft 365, Excel 2021, 2019, and older versions on Windows and Mac.

Why Row Highlighting Needs a Formula

Excel’s built-in conditional formatting presets (like Highlight Cells Rules) only compare a single cell to a value—they format that cell, not the row. To color an entire row, you must use a formula rule because the formula can reference a fixed column (with a $ sign) and a relative row number. When the rule applies to a range of rows, Excel evaluates the formula for each row, using the row’s own values. For example, if your data is in A2:E100 and you want to highlight rows where column C says “Overdue”, the formula =$C2="Overdue" tells Excel: for row 2, check C2; for row 3, check C3, and so on. The dollar sign locks the column so the check always uses column C, not the cell directly above or to the left.

Step-by-Step: Highlight Rows Based on a Cell Value

  1. Select the range of rows you want to format—for instance, A2:E100. Do not include the header row unless you want it highlighted too.
  2. On the Home tab, click Conditional Formatting > New Rule.
  3. Choose “Use a formula to determine which cells to format.”
  4. In the formula box, type a formula that references the first data row. For column C as the trigger, enter =$C2="Overdue" (adjust the column letter and row number to match your selection’s top-left cell).
  5. Click Format, go to the Fill tab, pick a color, and click OK.
  6. Click OK again to apply the rule.

On a Mac, the menu path is identical: Home > Conditional Formatting > New Rule. The formula syntax is the same. In Excel for the web, the steps are also the same, but the dialog appears as a side panel.

Using Multiple Conditions (AND/OR Logic)

You can highlight rows that meet several criteria at once. For example, to highlight rows where column A is “Project” and column D is greater than 1000, use the AND function: =AND($A2="Project",$D2>1000). For OR logic—highlight if column B is “High” or column C is “Urgent”—use =OR($B2="High",$C2="Urgent"). These formulas work exactly like ordinary Excel formulas; conditional formatting just uses them as a true/false test. Remember to keep the dollar sign only on the column reference, not the row, so each row evaluates its own data.

Highlighting Rows with Blank or Non-Blank Cells

To highlight rows where a specific column is blank, use =$D2="". To highlight rows where the cell is not blank, use =$D2<>"". Be careful: the formula =$D2="" will also treat cells containing a formula that returns an empty string as blank. If you only want truly empty cells, use =ISBLANK($D2) instead. For rows where a date is past due, compare with TODAY: =$E2 highlights rows where the date in column E is before today. To highlight rows with a date within the next 7 days, use =AND($E2>=TODAY(),$E2<=TODAY()+7).

Common Mistakes and How to Fix Them

  • Wrong cell reference: If you enter =C2="Overdue" without the dollar sign, Excel will shift the column reference as it moves across the row, highlighting only the cell in column C, not the whole row. Always lock the column with $C2.
  • Rule applies to the wrong range: The “Applies to” box in the Conditional Formatting Rules Manager must cover all rows you want formatted. If you select only A2:A10 before creating the rule, only column A gets highlighted. Edit the “Applies to” range to include all columns, e.g., =$A$2:$E$100.
  • Header row gets highlighted: If your selection includes row 1, the formula will evaluate the header text. Start your selection at row 2, or adjust the formula to exclude the header by using =AND(ROW()>1,$C2="Overdue").
  • Text case sensitivity: Conditional formatting formulas are case-insensitive by default, so “overdue” and “Overdue” both match. If you need exact case, use =EXACT($C2,"Overdue").

Using Conditional Formatting with Formulas That Return Numbers

For numeric conditions, you can use comparison operators directly. To highlight rows where column B is greater than or equal to 500, use =$B2>=500. For a range between two values, use =AND($B2>=100,$B2<=200). You can also reference another cell as a threshold—for example, if cell G1 contains the cutoff value, use =$B2>=$G$1. Note that the threshold cell reference should be absolute (with $ signs) so it doesn’t shift when the rule evaluates other rows. If you want to highlight the top 10 rows by value, you can use the built-in Top/Bottom Rules, but those only format the value cells, not the entire row. To highlight entire rows for the top N values, you would need a more complex formula like =$B2>=LARGE($B$2:$B$100,10)—this works but recalculates for every row, which is fine for datasets up to a few thousand rows.

Managing, Editing, and Deleting Rules

To see all rules on a sheet, go to Home > Conditional Formatting > Manage Rules. From there you can edit the formula, change the “Applies to” range, reorder rules, or delete them. If you have multiple rules on the same range, Excel applies them in order and stops at the first true rule unless you check “Stop If True”. For example, if you have a rule that highlights all rows with “High” priority in red and another that highlights rows with “High” and a date after today in yellow, the first rule will win for rows that satisfy both. To make the more specific rule take precedence, move it higher in the list or enable “Stop If True” on the first rule. On Excel for the web, the Manage Rules dialog is simpler but still allows editing and reordering.

Frequently Asked Questions

Why is my whole row not highlighting? The most common cause is a missing dollar sign in the column reference. Check that your formula looks like =$C2="Value", not =C2="Value". Also verify that the “Applies to” range includes all columns you want colored—if it only covers column A, only column A will change.

Can I highlight a row based on a cell in another sheet? Yes, but you need to reference the other sheet directly in the formula, like =Sheet2!$A2="Yes". The sheet name with a space must be in single quotes, e.g., ='Data Sheet'!$A2="Yes". Conditional formatting formulas can reference other sheets, but they cannot reference other workbooks unless the workbook is open.

Does conditional formatting slow down my spreadsheet? It can, especially if you apply a formula rule to thousands of rows. Each cell in the formatted range recalculates the formula. For large datasets, consider limiting the “Applies to” range to the actual data area, avoid volatile functions like TODAY() unless needed, and use simpler formulas. Excel recalculates conditional formatting only when the sheet recalculates, so it’s usually fine for a few thousand rows.

How do I highlight a row if any cell in that row contains a specific word? Use the COUNTIF function with a wildcard: =COUNTIF($A2:$E2,"*urgent*")>0. This checks the entire row from A to E for the text “urgent” anywhere. The asterisks are wildcards that match any characters before or after. This formula works for text and is case-insensitive.

Can I use a drop-down list to change the highlight dynamically? Yes. Put a data validation drop-down in a cell (say G1) with options like “Paid”, “Pending”, “Overdue”. Then use a formula rule like =$C2=$G$1. When you change the drop-down value, all rows where column C matches that value will highlight. The $G$1 reference is absolute so it always reads the drop-down cell.

Will the highlight update if I insert or delete rows? Yes, as long as the “Applies to” range expands or contracts automatically. If you insert a row inside the formatted range, Excel extends the range. If you delete a row, it shrinks. However, if you copy and paste rows from elsewhere, the formatting may not carry over—use Paste Special > Formats to copy the conditional formatting to new rows.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.