ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Coloring a cell if it does not match on another worksheet (https://www.excelbanter.com/excel-programming/357626-coloring-cell-if-does-not-match-another-worksheet.html)

[email protected]

Coloring a cell if it does not match on another worksheet
 
Hi

I'm new here so please excuse me if I'm not very clear.

I am currently working on a worksheet that contains a copy of a pivot
table from another worksheet. Some of the cells which were 0, I
replaced with a sum of values from a different workbook. However, I now
want to color the original cells that once contained 0, blue. Now they
contain different values, and so I wouldn't use conditional format.
Also - I'd like to learn some VBA.

The way I think I can do this is by making a macro that matches the
cell reference to the pivot table and if the values are not equal , to
color the cell blue.

Any help is appreciated

Tom


[email protected]

Coloring a cell if it does not match on another worksheet
 
I forgot to mention that the pivot table has blank cells sporadically
through it
I've replaced these blank cells with "No Data" in the copy of the pivot
table


Carim

Coloring a cell if it does not match on another worksheet
 
Hi Tom,

In my opinion, there is no need for a macro ...
With conditional formatting, use Formula Is
=ISNA(Match(yourCell,yourRangeName,0))
and pick whatever format differentiator you want ...
Do not forget to Insert Name Define yourRange, since all elements are
not located in the same worksheet.

HTH
Cheers
Carim



All times are GMT +1. The time now is 08:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com