Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    Macro to compare number

    I have a spreadsheet with account numbers in Col A & C. I would like a macro that will extract numbers that are unique to both Col A & C to Col E, for eg if 7802 appears in Col A, but not in Col C, it must be extracted to Col E as it is unique. I also need the heading from each column where the number is being extracted from in Col F


    I have extracted the unique numbers manually to show what the extraction must look like. I have a large number of number in the actual workbook, but have attached a sample file

    Your assistance in this regard is most appreciated

    http://www.mrexcel.com/forum/showthr...10#post3181810
    Attached Files Attached Files
    Last edited by HowardC; 2012-06-17 at 02:21.

  2. #2
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    New York, New York, USA
    Posts
    266
    Thanks
    0
    Thanked 19 Times in 19 Posts
    HowardC:

    What about using Match to compare the two lists.

    See the attached.

    By using Auto Filter, Advance Filter, or Sort the lists can be customized or if really necessay you could create in another column an IF formula to check for a positive number in Col G and put the Text You desire when greater than 0, Then repeat the same for Col H.
    Attached Files Attached Files

  3. The Following User Says Thank You to duthiet For This Useful Post:

    HowardC (2012-06-25)

  4. #3
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Thanks for the help, much appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •