Conditional Formatting of Rows or Cells If Two Columns Are Equal in Excel

When working with vast data sets in Excel, it can be helpful to highlight rows or cells where two columns are equal. Excel's Conditional Formatting tool makes this task straightforward. Here's how to use it:

Formatting Cells If Two Columns Are Equal

  1. Select the range where you want the formatting to apply.
  2. Go to the 'Home' tab, and then select 'Conditional Formatting' > 'New Rule'.
  3. In the 'New Formatting Rule' dialog box, select 'Use a formula to determine which cells to format'.
  4. In the 'Format values where this formula is true' box, input a formula comparing the two columns. For instance, =$A1=$B1. This formula will compare cells in columns A and B.
  5. Click the 'Format' button to choose the formatting you want to apply when the condition is met.
  6. Click 'OK'.

  7. Format cells based on their values

Formatting Entire Rows If Two Columns Are Equal

  1. Select the range where you want the formatting to apply.
  2. Follow steps 2 and 3 above.
  3. For the formula, enter a formula like =$A1=$B1, where A and B are the columns you want to compare. This will highlight the entire row when the values in columns A and B are equal.
  4. Follow steps 5 and 6 above.

  5. Highlight entire rows

Excel's Conditional Formatting tool allows you to dynamically format cells and rows based on the contents of your spreadsheet. With this guide, you can set up your worksheets to automatically highlight cells or rows where two columns are equal.

Previous
Previous

A Guide to Conditional Formatting Stacked Bar Charts in Excel

Next
Next

Creating Conditional Drop-Down Lists with IF Statements in Excel (5 Examples)