+ Reply to Thread
Results 1 to 13 of 13

[VBA] Comparing two columns and pasting the difference into a third column

Hybrid View

  1. #1
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: [VBA] Comparing two columns and pasting the difference into a third column

    Your logic still does not make sense
    A B C
    1 2 1 Existing in column A, but not B - Agree 1 exists in Column A but not B so 1 goes into C
    2 3 0 Exists in column B, but not A - 2 exists in Column A and in Column B however you say Exists in Column B but not A.
    3 0 5 Exists in column B, but not A - Why is 5 placed here? 3 Exists in Column A and B however you say it exists in Column B but not A
    4 5 4 Exists in column A, but not B

    I must be missing something. You are checking that a value in A is in column B. I just don't understand your rules. Perhaps someone will understand something I am missing.
    I just have no idea why 5 is in row 3?
    I am not being mean or aggressive I just do not get your logic rules.

    If the number is in A but not in B then the number goes to C. If the number is in B but not in A then it goes to C as well.
    That means that there could be 2 outputs into column C.
    Could you perhaps upload a slightly larger sample in a workbook - it is obviously clear in your mind but I am just not getting it.
    Last edited by smuzoen; 02-05-2012 at 11:45 PM.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  2. #2
    Registered User
    Join Date
    02-04-2012
    Location
    Portland, OR
    MS-Off Ver
    2010
    Posts
    5

    Re: [VBA] Comparing two columns and pasting the difference into a third column

    I've attached another example. Hopefully it clarifies it.

    IE. If Person A appears in first column, but not the second, it will then paste to the third.
    If Person B appears in second column, but not the first, it will then paste to the third.
    If Person C appears in first column and second column, then it will NOT show in the third.
    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