How do I flag if an entry is duplicate across multiple sheets?

2davidc8

New Member
Joined
Sep 27, 2018
Messages
32
Office Version
  1. 2019
Platform
  1. Windows
Let's say I have 4 sheets in a workbook, and I want to check only Column A for duplicates. I may have more than 4 sheets, but I want to flag a duplicate in only those 4 sheets.
If I'm making entries in Sheet2, for example, and the same Column A entry already exists in any of the 4 sheets in question, including Sheet2, I want to highlight it or flag it in some way.

I know how to use Conditional Formatting to find duplicates in a single worksheet. I now want to find if a duplicate occurs in more than one sheet.

Can I do this without resorting to VBA?

Thanks!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You could use something like
Excel Formula:
=OR(COUNTIFS(Sheet1!A:A,A2),COUNTIFS(Sheet2!A:A,A2))
where A2 is the first cell in the applies to range.
 
Upvote 0
Solution
@Fluff
Thank you for your reply. I'm afraid I don't quite understand your solution.
1) Where would I place this formula?
2) My understanding is the A2 in your example should represent a "criteria". How is A2 a criteria?
What I'm looking for is, for example:
if any value or entry in Column A of Sheet1 also appears anywhere in Column A of Sheet1, Sheet2, Sheet3 or Sheet4, both duplicate occurrences should be flagged (by changing the color of the text or the fill color), so for example,
if Sheet1!A5 has "Tom", and Sheet4!A32 also has "Tom", both "Tom's" should turn red.
Can you guide me as to how I could do this?
 
Upvote 0
You can use that formula in conditional formatting and when you type in a values that exists in another sheet it will be highlighted.
 
Upvote 0
@Fluff
Thank you for your solution.
It worked!
(However, note that the use of the OR function is not necessary.)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
@Fluff
Oh, two subtleties:

I should say, the OR function is not absolutely necessary. It can be used if you want to string all the sheets into one formula, as in your example.

And, in the reference to the current sheet, the formula should say > 1, as in:
COUNTIFS(A:A,A2)>1
Otherwise, every entry in the sheet will be highlighted.
 
Upvote 0
It can be used if you want to string all the sheets into one formula, as in your example.
Firstly that is what you asked for & secondly, to do that the OR is needed.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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