+ Reply to Thread
Results 1 to 4 of 4

compare and match

  1. #1
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    compare and match

    Hi all, I am new to VBA, so need some help... I have two columns, list A and list B with some names. I want a formula which can compare between A and B and give result in each row(in C) as 3 categories: (1) present in A, but not in B (2)present in B, but not in A (3)present in both. Also note that last filled row is not fixed, so could by any, and result should appear in column C, if data is present in column A and B. Any help will be appreciated. Regards Prasjohn

    List A List B Expected Result
    apple orange present in both
    orange banana in List B only
    pine Guava in List B only
    Grapes pine in List A only
    strawberry dates in List B only

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: compare and match

    I do not think you described problem well.
    Let's focus on column B and orange and pine entries.
    Why these are listed as once present in both (its for orange, because apple is only in A) and once List A only (pine is in both)?
    in my opinion right output shall be two-fold itemA present in .(either both or A only). and item B present in .(either both or B only).
    Best Regards,

    Kaper

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: compare and match

    By the way, you can have this output also from formula. for C1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-28-2007
    Posts
    45

    Re: compare and match

    Thanks Kaper.. You are right.. It worked the way I want...Regards..

+ 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] VBA Compare and Match
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-13-2014, 02:23 PM
  2. [SOLVED] VBA Compare & Match
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2013, 09:51 AM
  3. VBA: Compare, copy, and match
    By xlsnovice in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2013, 12:40 PM
  4. Replies: 6
    Last Post: 05-30-2012, 03:09 PM
  5. Compare/Match two columns
    By heartstealer in forum Excel General
    Replies: 3
    Last Post: 11-08-2010, 07:37 AM
  6. Compare/Match two columns
    By heartstealer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-07-2010, 03:18 PM
  7. Can't use match to compare two columns
    By AC169 in forum Excel General
    Replies: 6
    Last Post: 04-16-2009, 04:58 PM
  8. [SOLVED] Compare and Match Functions
    By DP63 in forum Excel General
    Replies: 1
    Last Post: 06-20-2006, 11:00 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