Link to home
Start Free TrialLog in
Avatar of activematx
activematxFlag for United States of America

asked on

Excel Macro to Compare two cells and highlight one red if values don't match

Hi Excel Experts,

Take a look at this screenshot:  
User generated image
I need a macro that can help me check to see if the values in Column L match the values in Column N.

If the values don't match, then I need to highlight the cell red.

Can someone help me do a macro that can go through the attached spreadsheet and perform the requested function?

I have attached two workbooks.  One of them has macros enabled, and the other does not.  The data inside of them is the same.  Thank you!
FY12-Invoices--No-Macros-.xlsx
FY12-Invoices--With-Macros-.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
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
SOLUTION
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
SOLUTION
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
Here's a revision to what I posted earlier using Conditional Formatting.  I changed the formula in column N to:
=IF(F3<>F2,SUMIF(F:F,F2,M:M),"")
FY12-Invoices--No-Macros-.xlsx
Glad I was able to help.

Marty - MVP 2009 to 2012