Link to home
Start Free TrialLog in
Avatar of Justin Owens
Justin OwensFlag for United States of America

asked on

Compare Two Excel Worksheets within a Workbook

I need to compare Seet1 against Sheet2.  I need any cell in Sheet2 which is not identical to Sheet1 to be highlighted by changing its text to RED.  This is an offshoot from a different question (https://www.experts-exchange.com/questions/25155367/Search-Text-In-Cell-and-Change-Color-after.html).
Avatar of nutsch
nutsch
Flag of United States of America image

You can use the below code to highlight differences, as conditional formatting doesn't work in separate worksheets.

Thomas
ASKER CERTIFIED SOLUTION
Avatar of nutsch
nutsch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Justin Owens

ASKER

That is almost exactly what I needed.  I changed line 13 to be ".Font.ColorIndex = 3" and I got the results I was looking for.  The code as posted changes the background color (fill) rather than font color.  You are correct in that conditional formatting won't work in this case because it is seperate worksheets.
Thanks!
Almost perfect, and pointed me in the direction to make it exactly what I needed.  Thanks!