+ Reply to Thread
Results 1 to 9 of 9

If text in cell equals text in another cell, highlight both same color.

  1. #1
    Registered User
    Join Date
    03-29-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    6

    If text in cell equals text in another cell, highlight both same color.

    -Sorry if this has been covered, I've been all over this forum & Google reading and I can't find this particular scenario. If what I am trying to accomplish has been explained in several steps I can definitely follow a few unrelated guides and piece them together.

    Scenario:
    1 Spreadsheet with entire building roster
    1 Spreadsheet with list of people in building who have completed a training.

    The Roster sheet has the names listed as "Doe, John"
    The Training sheet has the names listed in multiple Cells: Doe John

    I copied the data from each sheet into one file, and then used Text to Columns from the Data menu (with a comma delimiter) to separate the Roster names into different cells. The Training columns are significantly shorter than the Roster columns, and John Doe in the Roster column does not appear next to John Doe in the Training column.

    So I now effectively have a total of 4 columns to work with, and around 500 different people in the full Roster (all sorted A-Z by last name). I would like to highlight a person's name if their name appears in both sets of columns one color, and a different color if their name does not appear in the Training column and only appears in the Roster column. If this can me more easily accomplished with the names in the "Doe, John" format I can recombine all the names.

    If sample code is needed I have an example ready.

    Thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: If text in cell equals text in another cell, highlight both same color.

    Conditional formatting will do this, if you have a sample file, I can get you started on it?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-29-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    6

    Re: If text in cell equals text in another cell, highlight both same color.

    Quote Originally Posted by FDibbins View Post
    Conditional formatting will do this, if you have a sample file, I can get you started on it?
    So I would love to post an example.. but I'm not seeing the attachment button as* an option.. I can do an image, but not a file.. is there a minimum post count before you can attach a file?
    Last edited by xi Slick ix; 03-29-2012 at 07:16 PM. Reason: typo

  4. #4
    Registered User
    Join Date
    03-29-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    6

    Re: If text in cell equals text in another cell, highlight both same color.

    Attempting to upload picture of data.. there really isn't much going on with it.

    Example-Roster-Comparison.png

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: If text in cell equals text in another cell, highlight both same color.

    I am unable to view .png files here, sorry...to post a sample file, click "go advanced" next to "post quick reply", scroll down a little until you see "manage attachements"

  6. #6
    Registered User
    Join Date
    03-29-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    6

    Re: If text in cell equals text in another cell, highlight both same color.

    Sorry for my ignorance there, I was really looking and have been on hundreds of forums, but could not figure that out.

    Example-Roster-Comparison.xlsx

    Thanks.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: If text in cell equals text in another cell, highlight both same color.

    Ok, I have the 1st part worked out (the matches), working on the 2nd part (non-matches). I used the names as they are in Col A, and combined then again in col H. B and C shows how you could split them if needed, and H shows how to combine them if needed
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-29-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    6

    Re: If text in cell equals text in another cell, highlight both same color.

    Much appreciated!

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: If text in cell equals text in another cell, highlight both same color.

    Ok, I think i have it for you now I used conditional formatting on column A and Column H. Cols B and C are not needed (unless you have a need of them), and if you can copy your data in, the format shown in H, then you dont need F and G either.

    Whe you apply this to your live data, dont copy the CF down, just go into A3 and H3 and adjust the refernces that the CF is applied to (I currently have it applied to =$A$3:$A$8 and =$H$3:$H$8 respectively)

    Let me know if you have any other questions
    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)

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