+ Reply to Thread
Results 1 to 6 of 6

Preventing duplicates in multiple tabs

Hybrid View

  1. #1
    Registered User
    Join Date
    01-26-2015
    Location
    USA
    MS-Off Ver
    Microsoft Office 2010
    Posts
    24

    Preventing duplicates in multiple tabs

    Good afternoon,

    I have a spreadsheet with three tabs and on each tab there are unique numbers in column A. Never should a number in column A be present on more than one tab. I'm in need of help coming up with a formula that will, when a new number is entered in column A of any one of the three tabs, immediately check to see that the number entered is not already present in column A of the other two tabs and if so I would like it to highlight the cell of the number (kind of like the highlight duplicates function). It would be great to also have a text shown stating this # is also located in Tab X but I think that's asking too much of a formula Any ideas would be greatly appreciated. thank you!

  2. #2
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    633

    Re: Preventing duplicates in multiple tabs

    You can try this formula:

    =IF(OR(COUNTIFS(Sheet1!A1:A10,Sheet2!A1)>0,COUNTIFS(Sheet3!A1:A10,Sheet2!A1)>0),"Duplicate","")
    If I've helped U pls click on d *Add Reputation

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Preventing duplicates in multiple tabs

    Create a rule for each worksheet in Conditional Formatting using the following formula:
    Formula: copy to clipboard
    =OR(AND(A1<>"",COUNTIF(Sheet2!A:A,A1)>0),AND(A1<>"",COUNTIF(Sheet3!A:A,A1)>0))


    The above will work for Sheet1. For Sheet2 change the reference to Sheet2 to Sheet1. For Sheet3 change the references to be Sheet1 and Sheet2.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    01-26-2015
    Location
    USA
    MS-Off Ver
    Microsoft Office 2010
    Posts
    24
    Quote Originally Posted by newdoverman View Post
    Create a rule for each worksheet in Conditional Formatting using the following formula:
    Formula: copy to clipboard
    =OR(AND(A1<>"",COUNTIF(Sheet2!A:A,A1)>0),AND(A1<>"",COUNTIF(Sheet3!A:A,A1)>0))


    The above will work for Sheet1. For Sheet2 change the reference to Sheet2 to Sheet1. For Sheet3 change the references to be Sheet1 and Sheet2.
    Thanks for the idea!! Im trying to get this to work on my end but for some reason keep getting "You may not reference operators such as unions, intersections, and ranges. I copied your exact formula on a new spreadsheet to bug it out and got tthe same error. Any ideas?

  5. #5
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,654

    Re: Preventing duplicates in multiple tabs

    I like this more:
    =AND(A1<>"";OR(COUNTIF(Sheet2!A:A;A1)>0;COUNTIF(Sheet3!A:A;A1)>0))
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Preventing duplicates in multiple tabs

    Create each rule with the appropriate worksheet active. If you don't you will get that error. Each rule is created using the formula that references the other two worksheets.

    In the workbook that I uploaded, you will see that there is only one rule per worksheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Preventing Duplicate's, Multiple columns & on Multiple Tabs - Validation
    By Victoriak in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-12-2014, 04:22 AM
  2. Preventing Duplicates
    By dooz1990 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2013, 04:54 PM
  3. Identifying duplicates across multiple tabs with VBA
    By 0nyx1756 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2011, 11:02 AM
  4. Find duplicates - multiple tabs
    By search66 in forum Excel General
    Replies: 1
    Last Post: 04-18-2011, 11:57 AM
  5. Preventing Duplicates
    By yegnal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2010, 01:13 AM
  6. Preventing Duplicates
    By tommytee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2008, 07:27 AM
  7. [SOLVED] Preventing Duplicates
    By Ed in forum Excel General
    Replies: 11
    Last Post: 05-31-2006, 11:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1