Colour a Cell if Criteria matched on a row.

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"

Serial Number
Asset Location
Area
Zone
NZ
Position
Price
2251158
A
1
1
2
1
N/A
1995712
A
1
1
2
2
0.01
1995715
B
2
3
2
4
0.06

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,136,733
Messages
5,677,445
Members
419,693
Latest member
divtjd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top