+ Reply to Thread
Results 1 to 5 of 5

Compare Columns In Different Workbooks and Highlight Differences

  1. #1
    Registered User
    Join Date
    03-16-2013
    Location
    USA
    MS-Off Ver
    Excel 2013 2016
    Posts
    14

    Compare Columns In Different Workbooks and Highlight Differences

    Need a macro to compare columns in 2 different workbooks and highlight the entries that are different, based on the comparison
    Column C of Workbook 1 had 5 names on 5 rows
    Column B of Workbook 2 has 5 names on 5 rows (there will be instances when workbook 2 might have more or less names)
    Can a macro compare column C of workbook 1 and column B of workbook 2 and highlight the entries that are different in the 2 workbooks?
    There is a blank row after the list of names ends, so I believe a macro is able to identify when a list ends.

    Any help is sincerely appreciated!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Compare Columns In Different Workbooks and Highlight Differences

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    03-16-2013
    Location
    USA
    MS-Off Ver
    Excel 2013 2016
    Posts
    14

    Re: Compare Columns In Different Workbooks and Highlight Differences

    Please see the two workbooks attached. In Book 1 column B has a list of names and Book 2 column C has a list of names. Some are common, some are not. The macro should, in Book 1, compare the names in column B (from Book 1) with the names in column C (in Book 2) and populate the result in Book 1. Where the names match, it can return"OK" and where the names do not match, it can return "Not Found". Since this list of names in both spreadsheets can be long, it would be nice if Excel could check row after row till it finds a blank cell and then stop.
    Attached Files Attached Files

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Compare Columns In Different Workbooks and Highlight Differences

    I named your books as shown in the red code:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-16-2013
    Location
    USA
    MS-Off Ver
    Excel 2013 2016
    Posts
    14

    Re: Compare Columns In Different Workbooks and Highlight Differences

    That helps, Thanks. It looks for each value listed in Book 1 and returns OK or NOT FOUND. It does not however look for values in Book 2 and compare it against the list in Book 1. But this is a great start. I'll try and build on this. Thx again.

+ 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. Compare 2 columns and highlight differences
    By zookeepertx in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2014, 01:41 PM
  2. Replies: 0
    Last Post: 07-17-2014, 10:06 AM
  3. [SOLVED] VBA to compare and highlight differences
    By REFisher14 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-19-2014, 03:18 PM
  4. [SOLVED] Compare Two Workbooks and Highlight Differences
    By mab1284 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2014, 07:35 PM
  5. Replies: 9
    Last Post: 04-18-2013, 03:54 PM
  6. [SOLVED] Compare columns in different worksheets nad highlight differences
    By intercooler in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-13-2012, 01:05 PM
  7. Compare 2 Workbooks and Highlight Differences
    By LabanM in forum Excel General
    Replies: 3
    Last Post: 10-19-2010, 11:34 AM

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