Skip to main content

How to change color if two cells are not equal in Excel?

Author Sun Last modified

When working with two lists in Excel, you might need to highlight discrepancies by changing the color of cells where adjacent values are not equal. This can help quickly identify mismatches and inconsistencies in your data. In this guide, we will explore two effective methods for achieving this. Whether you're looking for a manual method or a quicker, automated solution, we've got you covered.

A screenshot showing highlighted cells where adjacent values are not equal in Excel

Highlight cells that are not equal using Conditional Formatting

1. Select the two lists you want to compare for equality, and click "Home" > "Conditional Formatting" > "New Rule".

2. In the "New Formatting Rule" dialog, choose "Use a formula to determine which cells to format", and type the following formula into the "Format values where this formula true". Then click "Format" to open "Format Cells" dialog, and select one color under "Fill" tab.

=$A1<>$B1
A screenshot of the New Formatting Rule dialog box in Excel for conditional formatting

3. Click "OK" > "OK". Then the cells will be colored if the two cells are not equal to each other.
A screenshot of the results of cells highlighted where values differ


Easily color cells if not equal with Kutools for Excel

If you want to quickly identify and highlight cells where two adjacent cells are not equal, "the Select Same & Different Cells" utility of "Kutools for Excel" offers a more streamlined solution compared to Conditional Formatting. Unlike Conditional Formatting, which requires complex rule setup and may be time-consuming, Kutools simplifies the process with just a few clicks.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After installing Kutools for Excel, click "Kutools" > "Select" > "Select Same & Different Cells". Then configure the dialog box as follows.

  1. In the "Find Values" in box, select the column that you want to compare.
  2. In the "According to" box, choose the column to compare it against.
  3. In the "Base on" section, select the "Each row" option.
  4. In the "Find" section, choose the "Different Values" option.
  5. Check the "Fill backcolor" option, choose a fill color, and click "OK".
Result

The cells in the first selected column that do not match the corresponding cells in the specified column will be highlighted with the fill color you selected.

A screenshot of the results after using Kutools to highlight cells where values differ

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


Demo: Easily color cells if not equal with Kutools for Excel

 
Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!