Identifying different cell values VBA

JoeRooney

Board Regular
Joined
Nov 27, 2017
Messages
171
Office Version
  1. 365
Hi, <o:p></o:p>
<o:p> </o:p>
Wondering if someone could assist me with some code to identify cell differences in a spreadsheet.<o:p></o:p>
<o:p> </o:p>
I need the macro to highlight the cells that have the samefirst name in column A and different values in the direct cell below in column .<o:p></o:p>
<o:p> </o:p>
example below . <o:p></o:p>
<o:p> </o:p>
Any help is greatly appreciated . <o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
[TABLE="class: MsoNormalTable, width: 203"]
<tbody>[TR]
[TD="width: 79, bgcolor: transparent"]
A<o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"]
B<o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"]
C<o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"]
D<o:p></o:p>
[/TD]
[/TR]
[TR]
[TD="width: 79, bgcolor: transparent"] John Smith <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] x<o:p></o:p>
[/TD]
[/TR]
[TR]
[TD="width: 79"] John Smith <o:p></o:p>
[/TD]
[TD="width: 64"] <o:p></o:p>
[/TD]
[TD="width: 64"] <o:p></o:p>
[/TD]
[TD="width: 64"] x<o:p></o:p>
[/TD]
[/TR]
[TR]
[TD="width: 79"] John Smith <o:p></o:p>
[/TD]
[TD="width: 64"] <o:p></o:p>
[/TD]
[TD="width: 64"] <o:p></o:p>
[/TD]
[TD="width: 64"] y<o:p></o:p>
[/TD]
[/TR]
[TR]
[TD="width: 79, bgcolor: transparent"] Jane Smith <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] x<o:p></o:p>
[/TD]
[/TR]
[TR]
[TD="width: 79, bgcolor: transparent"] Jane Smith <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] x<o:p></o:p>
[/TD]
[/TR]
[TR]
[TD="width: 79, bgcolor: transparent"] Jane Smith <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] x<o:p></o:p>
[/TD]
[/TR]
[TR]
[TD="width: 79, bgcolor: transparent"] John Smith <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] <o:p></o:p>
[/TD]
[TD="width: 64, bgcolor: transparent"] Y<o:p></o:p>
[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 270"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col><col span="3"></colgroup>[/TABLE]
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Sorry should have added more detail in the scenario above I would need rows 3 & 4 highlighted.
 
Upvote 0
Sorry the sentence should have read

I need the macro to highlight the cells that have the same first name in column A and different values in the direct cell below in column D

so rows 3 & 4 should be highlighted.

<o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,822
Members
452,672
Latest member
missbanana

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
Back
Top