+ Reply to Thread
Results 1 to 12 of 12

Find Dupes across multiple wkshts and color the cell

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    St. Augustine, FL
    MS-Off Ver
    2007
    Posts
    7

    Find Dupes across multiple wkshts and color the cell

    Hi All,

    I am a newbie and my first post--hoping to get some help.

    I am tracking appointments and training qualifications by name (of person appointed) and date of qualification. Each type of appointment has its own worksheet, but each appointment may have some of the same training qualifications.

    What I want is to highlight (color) the cell that contains the person's name if it is duplicated on another worksheet. I do not know how to do this across multiple worksheets.

    I have attached the file for your convenience. I would appreciate any help. :)

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Find Dupes across multiple wkshts and color the cell

    Use conditional formatting. For example, in the CaGs sheet, highlight B1:B39 and choose conditional formatting. Choose 'UseFormula...' and use this formula:
    =NOT(AND(ISERROR(MATCH(B1,Fiscal!$B$2:$B$66,0)),ISERROR(MATCH(B1,DTS!$B$2:$B$6,0))))
    and set the formatting how you wish.

    Note that the formula above does not include the empty P&C sheet, but you can add it with another ISERROR(....) block.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Find Dupes across multiple wkshts and color the cell

    Done it..
    Here is your conditional formatting formula.. ( CF will treat it as an array...)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Check the attached file..
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  4. #4
    Registered User
    Join Date
    09-10-2014
    Location
    St. Augustine, FL
    MS-Off Ver
    2007
    Posts
    7

    Re: Find Dupes across multiple wkshts and color the cell

    Hi Pauleyb,

    I tried your suggestion, but it gave me an error: "You cannot use conditional formatting to reference other worksheets"..which is the problem. I need all instances of the dupe names to be highlighted in a color so I can readily see them.

  5. #5
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Find Dupes across multiple wkshts and color the cell

    Hmm, that's strange it worked for me. I have 2010, but I don't think that changed. Attached is your file, modified with my suggestion.

    {Added 5 minutes later}
    Apparently, the ability to go across sheets is a new feature in 2010.
    http://blogs.office.com/2009/08/11/m...in-excel-2010/

    However, in 2007 you can use named ranges to get around that shortcoming.

    So, the equation would be something like:
    =NOT(AND(ISERROR(MATCH(B1,FiscalData,0)),ISERROR(MATCH(B1,DTSData,0))))

    It also looks like Vikas provided another solution, but I know INDIRECT tends to slow things down. Probably not a problem if your dataset is relatively small.
    Last edited by Pauleyb; 10-31-2014 at 02:38 PM.

  6. #6
    Registered User
    Join Date
    09-10-2014
    Location
    St. Augustine, FL
    MS-Off Ver
    2007
    Posts
    7

    Re: Find Dupes across multiple wkshts and color the cell

    That works, but only if there are dupes on the same page. I need it to highlight the dupe across all pages at once.

    If, for example--Doe, Jane were duplicated on 'CaGs' and then was also added to the 'Fiscal' worksheet, she would be highlighted on both spreadsheets at once.

  7. #7
    Registered User
    Join Date
    09-10-2014
    Location
    St. Augustine, FL
    MS-Off Ver
    2007
    Posts
    7

    Re: Find Dupes across multiple wkshts and color the cell

    Hi Vikas,

    I downloaded your file that you sent back and I see that it did highlight the dupe names from the other worksheets, which is what I wanted it to do--but, is there a way to modify it so the dupe names from the other spreadsheets are highlighted at the same time.

    Example: If Wiseman, William J. [cell B44] is highlighted on the 'CaGs' WS b/c he is also on the 'Fiscal' WS [cell B6], I would like that cell to be highlighted as well. Thank you.

  8. #8
    Registered User
    Join Date
    09-10-2014
    Location
    St. Augustine, FL
    MS-Off Ver
    2007
    Posts
    7

    Re: Find Dupes across multiple wkshts and color the cell

    Hi Vikas,

    How do u get it to treat like an array? [Ctrl] [Alt] [Enter]? Do I enter the formulat into the Conditional formatting section first? I have never used arrays and was just reading about them on Excel 'help'.

    Also, what is the significance of the following in your fomula?:

    P$2:$P$5 and >1
    Last edited by NGBFLNG1; 10-31-2014 at 04:44 PM.

  9. #9
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Find Dupes across multiple wkshts and color the cell

    For both approaches, you will need to set up CF for each range on each sheet. Just modify the provided formula to include the other sheets (and remove the current sheet). So, with four sheets, you will need four CF.

    I'll also answer your last question. Don't worry about it. CF automatically interprets the formula as an array.

  10. #10
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Cool Re: Find Dupes across multiple wkshts and color the cell

    Here is the revised workbook...
    All dupes have been highlighted on each worksheet....
    NOTE:-
    There in not need of pressing CTRL + SHIFT + ENTER, because CF will automatically treat it like array formula..

    Check the attached file..

  11. #11
    Registered User
    Join Date
    09-10-2014
    Location
    St. Augustine, FL
    MS-Off Ver
    2007
    Posts
    7

    Re: Find Dupes across multiple wkshts and color the cell

    I see it works in the spreadsheet you uploaded to me, but I wonder why I cannot duplicate your formula in my own copy of the workbook. I copy and pasted your formula into the Conditional Formatting (CF) section. Is there something I'm missing?


    Oh I think I am missing something in cells P2 through P4. Let me check that out first and then I will write "Solved" to this thread. Thx.
    Last edited by NGBFLNG1; 11-03-2014 at 12:21 PM.

  12. #12
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Find Dupes across multiple wkshts and color the cell

    After putting sheet names in $P$2:$P$5
    Steps..
    1. First Select the Column B wholly
    2. Then apply the new conditional formatting formula ie. =SUM(COUNTIF(INDIRECT("'"&$P$2:$P$5&"'!$B:$B"),B2))>1
    3. Choose your appropriate color and press ok..

    thats it..

    Regards,

+ 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. Delete Dupes Macro - Error When No Dupes
    By JADownie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2014, 12:05 PM
  2. Eliminating dupes from a single cell with multiple values
    By Trishnalynn in forum Excel General
    Replies: 1
    Last Post: 01-08-2014, 04:08 PM
  3. Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst
    By katkins0429 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-17-2013, 10:58 AM
  4. Compare 2 worksheets, delete dupes and group by back fill color using macro
    By jousterlj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2011, 01:50 PM
  5. Replies: 1
    Last Post: 10-27-2009, 03:59 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