+ Reply to Thread
Results 1 to 4 of 4

compare and highlight unique ID values across worksheets.

  1. #1
    Registered User
    Join Date
    10-07-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    2

    compare and highlight unique ID values across worksheets.

    Hi all,

    I have a problem. Basically, I have a workbook with multiple worksheets which will have participant information. I'd like to be able to compare and highlight the unique values across two of these worksheets based on the ID value in column A of each worksheet.

    For example two of the worksheets should contain information on the same participants, therefore I'd like to know when a participant appears in one worksheet but not the other based on the ID number in column A of each worksheet. I have been playing around with a sample workbook and thought I had achieved this using conditional formatting by using the formula below.

    =SUM(COUNTIF(INDIRECT("'Sheet" & ROW($1:$2) & "'!$A:$A"),$A1))<=1

    However, I have issues because every 2 weeks I will be copying and inserting new data into one of these worksheets from a different location, and when doing this the formulas stop working.

    I'm a relative newbie to excel formula so any help would be appreciated.

    Cheers

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: compare and highlight unique ID values across worksheets.

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please DO NOT attach a picture of an Excel sheet (I do not have the patience to re-type any/all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. For example, don't show text in a column if it's really a number. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually). To be honest, I am not interested in seeing a non-working formula... or a pile of blank cells. However, I am very interested in seeing your EXPECTED results in their EXPECTED location.

    4. Try not to use merged cells. They cause lots of problems and are DEFINITELY best avoided!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    10-07-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    2013
    Posts
    2

    Re: compare and highlight unique ID values across worksheets.

    Hi Glenn,

    Thanks for your response.

    I've made up a dummy sheet and attached, as you've asked. The full sample will be around 2000.

    A bit more info on the functionality i'm after. every 2 weeks we will have 80 participants move onto the scheduling list who will need to be scheduled for a data collection session. These 80 participants are grouped by a predetermined grouping number, i.e. group 1,2,3 etc.

    In reference to the sample file there is a scheduling1, scheduling2, and participant list worksheet. The way it would work would be:
    Participant list - will be a list of all 2000 participants with contact details etc. and the grouping variable
    Scheduling 1- will be generated from stata, pulling data from our participant database based on participants who fit the scheduling criteria from the database.
    Scheduling2 - will be the current group of participants (i.e. group 2) plus any of the previous groups (group 1) who have not yet completed a data collection session

    Each 2 weeks I'd like to manually move the next group of participants from the participant list worksheet to the scheduling2 worksheet, then generate the data in scheduling1 from stata. Ideally these should be the same, but if they are not i'd like it so any ID's that appear in one of the scheduling lists but not the other highlights red for example so we can see where any discrepancies are.

    I've deleted the conditional formatting and just highlighted the examples, but for reference i currently have the code below as conditional formatting in column 1 of each and it seems to work until cut and insert the group 3 into the top of the scheduling 3 worksheet.

    =SUM(COUNTIF(INDIRECT("'Scheduling" & ROW($1:$2) & "'!$A:$A"),$A1))<=1

    Please let me know if this isn't clear in any way.

    Appreciate the help
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: compare and highlight unique ID values across worksheets.

    Is this it??

    CFin scheduling1
    =AND($A2<>"",ISERROR(MATCH($A2,Scheduling2!$A:$A,0)))

    and in scheduling2:
    =AND($A2<>"",ISERROR(MATCH($A2,Scheduling1!$A:$A,0)))
    Attached Files Attached Files

+ 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. Need to compare two columns and highlight unique values.
    By @jerry in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-06-2015, 03:20 AM
  2. Compare Columns & Highlight Unique Values
    By TheExcelNewbie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-21-2015, 10:06 AM
  3. [SOLVED] Compare table on 2 separate spreadsheets and highlight unique values
    By lashellr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2014, 01:50 PM
  4. [SOLVED] Compare two worksheets and highlight differences on one of the worksheets
    By Phil Payne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2013, 04:00 AM
  5. Replies: 9
    Last Post: 04-18-2013, 03:54 PM
  6. [SOLVED] compare and highlight, same row, same column, but two different worksheets
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2012, 10:57 AM
  7. Compare Two Worksheets and Highlight Changes
    By TEAM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2006, 04:15 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