Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Is there a way to mark conditional format on more than one worksheet

Posted on 2015-01-11
3
Medium Priority
?
103 Views
Last Modified: 2015-01-12
Was looking around and haven't seen anything really for this, not sure if formula or VB code, but I have a report that is given at the end of each week.  I'm looking to see if there's a way that a duplicate check can be done on each day where it will look at the other sheet and mark for a duplicate based on the column marked "Invoice".

So if there's an invoice# 123 on Monday and Wednesday, it will highlight invoice red on both days. Is this possible?
ExampleFile.xlsx
0
Comment
Question by:NYANBCNY32
3 Comments
 
LVL 50

Assisted Solution

by:Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 400 total points
ID: 40543713
Hello,

you can use a Countif for each sheet and add up the results. If the total  is greater than one, then there is a duplicate in one of the other sheets. For example, create a new rule on column C, starting in cell C2 using this formula:

=COUNTIF(Monday!C:C,C2)+COUNTIF(Tuesday!C:C,C2)+COUNTIF(Wednesday!C:C,C2)+COUNTIF(Thursday!C:C,C2)+COUNTIF(Friday!C:C,C2)>1

Extend the format down to cover all rows and copy the format to column C in all other sheets.

Note that Excel before version 2010 does not allow references to other sheets in conditional formatting formulas. In this case you would need to create named ranges and refer to these instead,

cheers, teylyn
0
 
LVL 6

Accepted Solution

by:
Let's Go earned 1600 total points
ID: 40543757
If you have lots of data, it may be easier for the user using multiple conditional formatting conditions.  For example,
if there is a duplicate within the day: colour the cell red
if there is a duplicate with Tuesday: colour the cell orange
if there is a duplicate with Wednesday: colour the cell yellow
etc.

Tests would be:
To check for duplicates within a day: COUNTIF(C:C,$c3)>1
To check for duplicates between a day and Tuesday (you would not use this on Tuesday's cells): =NOT(ISNA(VLOOKUP($C3,Tuesday!$C:$C,1,FALSE)))
with similar tests for each other day

A sample of this method (formatting applied to Monday only) is attached.
ExampleFile2.xlsx
0
 

Author Closing Comment

by:NYANBCNY32
ID: 40545924
Thank you both for the help on this piece, it is greatly appreciated and working beautifully.  Cheers.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Make the most of your online learning experience.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Six Sigma Control Plans

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question