Link to home
Start Free TrialLog in
Avatar of Rayne
RayneFlag for United States of America

asked on

cmp two tables:in VBA

Hello
There are two tables with identical columns  - 5 columns each. A column can have text or numbers in them. How do do a compare so that I compare each cell value of table1 to table2 for the same row and column and if there is a difference, I highlight or indicate it in both tables…for example
Please see the attached….how do I do that in vba. Can the same by done via formulas?
questionFor.xlsx
Avatar of Rayne
Rayne
Flag of United States of America image

ASKER

actually highlight the difference in the second table is preferred

thank you
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India 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 Rayne

ASKER

this is amazin, thank you Sire :)
Avatar of [ fanpages ]
[ fanpages ]

He's a hoot! ;)

I know I am late to the party, but here is a different approach (using Conditional Formatting on the range [J:N]), that does not need any Visual Basic for Applications code (although I appreciate that this was your requirement when posting the question).

The Conditional Formatting in cell [J1], for instance, is: =OFFSET(J1,0,-9)<>J1

However, I acknowledge that you may well just wish to apply from rows 3 onwards.
Q-28706581.xlsm
Avatar of Rayne

ASKER

thank you fanpages :)

This is awesome too, a one liner
:) You're very welcome, Rayne.
You're welcome Rayne! Glad I could help. :)