Solved

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

Posted on 2015-01-11
3
87 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:teylyn
teylyn earned 100 total points
Comment Utility
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 400 total points
Comment Utility
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
Comment Utility
Thank you both for the help on this piece, it is greatly appreciated and working beautifully.  Cheers.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A short article about problems I had with the new location API and permissions in Marshmallow
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now