+ Reply to Thread
Results 1 to 4 of 4

vba - compare 2 columns highlight data not common to both

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    vba - compare 2 columns highlight data not common to both

    hi all

    Looking for some code to do a simple compare column A to Column B (row 1 contains headings) and highlight any differences.

    cheers
    Last edited by Gti182; 05-09-2014 at 05:59 AM.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: vba - compare 2 columns highlight data not common to both

    Please Login or Register  to view this content.
    or something similar.

    Edit: just re-read your post, that will highlight anything in column A that is not present anywhere in B and vice-versa, if you just want to compare row against row then use conditional formatting and something like:
    =$A2<>$B2
    as the formula
    Last edited by ragulduy; 05-09-2014 at 05:56 AM.

  3. #3
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: vba - compare 2 columns highlight data not common to both

    balling! Thanks Ragukluy

    i did get a "compile error: Sub or Function not defined" but changed worksheetfunctionmax to worksheetfunction.max and it worked

  4. #4
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Re: vba - compare 2 columns highlight data not common to both

    U can use this
    Attached Files Attached Files
    Please make the Post as solved, when you get your answer & Click * if you like my suggestion

+ 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. [SOLVED] Highlight cells that are common among several columns
    By vasu81 in forum Excel General
    Replies: 2
    Last Post: 10-05-2012, 02:00 PM
  2. Replies: 5
    Last Post: 07-05-2011, 06:25 PM
  3. macro to compare columns and highlight common rows
    By jagman1990 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-22-2010, 12:27 PM
  4. Compare 2 columns and highlight matching data
    By schueyisking in forum Excel General
    Replies: 3
    Last Post: 08-13-2009, 10:47 AM
  5. [SOLVED] Compare multiple column of data and list out common and unique component in adj columns
    By kuansheng in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-01-2006, 06:55 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