VBABeginner1
New Member
- Joined
- Dec 6, 2014
- Messages
- 31
Hello,
I have 222 columns of data in one table that I need to compare to another.
What I want it to do is: Highlight in Green if it matches and Red if it doesn't.
Basically a report is "Exported" from software and pasted into the excel file into the tab "ChExport"
Then I want to run a macro on "ChExport" that matches the Serial Number to the same serial number on the tab "Compare". If it finds a serial number that matches, it will then go through and compare all 222 columns of data and highlight them red if false and green if true.
There can be as little as one row of data in "ChExport" or up to 20,000 rows.
Below is what the table looks like. Both Tables on "ChExport" and "Compare" are laid out identically. Serial number begins on "G2"
[TABLE="width: 500"]
<tbody>[TR]
[TD]
[TABLE="width: 469"]
<tbody>[TR]
[TD]Serial Number
[/TD]
[TD]Asset Location
[/TD]
[TD]Area
[/TD]
[TD]Zone
[/TD]
[TD]NZ
[/TD]
[TD]Position
[/TD]
[TD]Price
[/TD]
[/TR]
[TR]
[TD]2251158
[/TD]
[TD]A
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]N/A
[/TD]
[/TR]
[TR]
[TD]1995712
[/TD]
[TD]A
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]2
[/TD]
[TD]0.01
[/TD]
[/TR]
[TR]
[TD]1995715
[/TD]
[TD]B
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]2
[/TD]
[TD]4
[/TD]
[TD]0.06
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have 222 columns of data in one table that I need to compare to another.
What I want it to do is: Highlight in Green if it matches and Red if it doesn't.
Basically a report is "Exported" from software and pasted into the excel file into the tab "ChExport"
Then I want to run a macro on "ChExport" that matches the Serial Number to the same serial number on the tab "Compare". If it finds a serial number that matches, it will then go through and compare all 222 columns of data and highlight them red if false and green if true.
There can be as little as one row of data in "ChExport" or up to 20,000 rows.
Below is what the table looks like. Both Tables on "ChExport" and "Compare" are laid out identically. Serial number begins on "G2"
[TABLE="width: 500"]
<tbody>[TR]
[TD]
[TABLE="width: 469"]
<tbody>[TR]
[TD]Serial Number
[/TD]
[TD]Asset Location
[/TD]
[TD]Area
[/TD]
[TD]Zone
[/TD]
[TD]NZ
[/TD]
[TD]Position
[/TD]
[TD]Price
[/TD]
[/TR]
[TR]
[TD]2251158
[/TD]
[TD]A
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]N/A
[/TD]
[/TR]
[TR]
[TD]1995712
[/TD]
[TD]A
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]2
[/TD]
[TD]0.01
[/TD]
[/TR]
[TR]
[TD]1995715
[/TD]
[TD]B
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]2
[/TD]
[TD]4
[/TD]
[TD]0.06
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]