Excel 2010 - Conditional Formatting for Duplicate Values Across Worksheets

Janice Smith
Janice Smith used Ask the Experts™
on
Hello Experts,

Is there a formula or conditional formatting that can be applied to worksheets in a workbook that will change the font to a different color if the values in any of the cells or columns in one worksheet appear on any other worksheet in the work book? I've attached a simple workbook just in case you can add the formula to the workbook as an example of how it's done.

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Janice SmithSystems Analyst

Author

Commented:
Oops...here's the attachment.
EE-Sample-Workbook.xls
I don't think it is possible to look at entire worksheets without VBA.
For single columns like the sample, conditional formatting and named ranges can do it.
Red means the name is on both sheets City2 and City3, green on City2, and blue on City3.

It is not clear what you mean by "values in any of the cells or columns", so this is for single cell formatting.
EE-Sample-Workbook.xls
Janice SmithSystems Analyst

Author

Commented:
Thank you.  

I mean if any values in column A on any of the worksheets appear in the same column on any other worksheet, then  the formatting should be applied.
EE-Sample-Workbook-2.xls
Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015
Commented:
As per your sample data, create three dynamic named ranges like City1, City2 and City3 then on each sheet apply a new rule for conditional formatting for whole col. A using the formula given below and set the format as per your choice.

=AND((COUNTIF(City1,A1)+COUNTIF(City2,A1)+COUNTIF(City3,A1))>1,ROW()<>1)

Open in new window


Please refer to the attached for more details and see if this is something you can work with.

PS. The only constraint here I see is the version you are using. You will have to check if this works for your version also.
EE-Sample-Workbook.xls
Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015

Commented:
Chosen answer takes carer of the original requirement.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial