Identifying different cell values VBA

JoeRooney

Board Regular
Joined
Nov 27, 2017
Messages
169
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>
A<o:p></o:p>
B<o:p></o:p>
C<o:p></o:p>
D<o:p></o:p>
John Smith <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
x<o:p></o:p>
John Smith <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
x<o:p></o:p>
John Smith <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
y<o:p></o:p>
Jane Smith <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
x<o:p></o:p>
Jane Smith <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
x<o:p></o:p>
Jane Smith <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
x<o:p></o:p>
John Smith <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Y<o:p></o:p>
<tbody> </tbody>


<tbody>
</tbody><colgroup><col><col span="3"></colgroup>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
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,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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