+ Reply to Thread
Results 1 to 12 of 12

Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Hi There,

    I am after something pretty simple I guess, but feel completely useless with Excel! I have searched on this forum and all answers seems more complex than I need or am able to re-engineer!

    I have 2 sets/lists of computer names - one is a large list (A) and one is a subset of the larger list (B). I can have these in a separate worksheet or for now in Column A and Column B.

    I want to either colour (column B) or display in Column C if values in Column B appear anywhere in Colum A - they are not going to be lined up or in an order, so would be anywhere in the columns/array.

    Example (below there is a single match for example)

    ........A...............B...........C
    1...PC1kfg......PC1hak.........
    2...PC123f......PC12345......
    3...PC5wrp0....PC1kfg........
    4...PC13jms......................

    ...etc

    Is there an easy way to do this? Is I vlookup?

    Thank You Very Much
    Last edited by cluele55; 05-03-2013 at 04:54 AM.

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Hi cluele55

    To colour a cell value in column B if it is in column A, use conditional formatting, select column B and for the rule: =MATCH($B1,A:A,0), format as required.

    Or in C2 and copy down
    =IF(COUNTIF(A:A,B2)>0,"Match","")
    Last edited by Kevin UK; 05-03-2013 at 05:02 AM. Reason: Forgot to add the Countif for column C
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  3. #3
    Registered User
    Join Date
    05-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Thanks - I have tried that formula in Column c and get a returned value of 4??

    Am I typing in wrong collumn and/or what does 4 represent?

    thanks

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    what formula are you putting in column C!

  5. #5
    Registered User
    Join Date
    05-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    samplebook.xlsx

    Attached!

  6. #6
    Registered User
    Join Date
    05-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Just seen your second formula - that seems to be working for a Colum C - just looking up conditional formatting to get colour - Thanks for your speedy replies!

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Hi cluele55

    See the attached the colour in column B is conditional formatting using : =MATCH($B1,A:A,0)

    On the home tab, conditional formatting, new rule.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Just looking to write a SUM formula to count all the 'MATCH' that appears to give me a number.

  9. #9
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Hi cluele55

    To sum as per your sheet in post #5
    =SUMPRODUCT(COUNTIF(A1:A5,B1:B4))

  10. #10
    Registered User
    Join Date
    05-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    Many Thanks for taking the time to do that for me!

    Found the countif I needed to add the matches!

    I did it this way

    =COUNTIF(c:c,"Match")

  11. #11
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    No problem cluele55, Glad your sorted and thanks for the back.

  12. #12
    Registered User
    Join Date
    05-03-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare 2 Columns/sheets with simialr data then either colour or display duplicates?

    I think your way is a lot tidier though :-)

    THANK YOU!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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