+ Reply to Thread
Results 1 to 8 of 8

Macro for Comparison

  1. #1
    Registered User
    Join Date
    11-22-2014
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    83

    Macro for Comparison

    I have a macro that compares the datas in column A and B of the sheets 'Patches' and 'NA' and deletes the data in the 'Patch' sheet that matches with the ones in the 'NA' sheet.

    It works perfect except for one issue. There is a patch ,

    'Must Upgrade Product SP Before Applying Patch' in the 'Patches' sheet for a lot of machines whereas the same patch is present for only on machine (D) in the 'NA' sheet (Marked in Red).

    when i run the macro all the 'Must Upgrade Product SP Before Applying Patch' is deleted in the 'patches' sheet whereas it must be deleted only for the machine D.

    Please Login or Register  to view this content.
    can any one please help me on this? Thanks in advance!!
    Attached Files Attached Files
    Last edited by sarajun_88; 01-12-2015 at 05:46 AM. Reason: Code

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Macro for Comparison



    Must respect forum rules : code tags ‼

  3. #3
    Registered User
    Join Date
    11-22-2014
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    83

    Re: Macro for Comparison

    Sorry!! Edited as per the rule

  4. #4
    Registered User
    Join Date
    09-14-2004
    Location
    Jämtland, Sweden
    Posts
    16

    Re: Macro for Comparison

    How about this instead?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-22-2014
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    83

    Re: Macro for Comparison

    Sorry!! this didn't work the way I wanted

    Thank You!

  6. #6
    Registered User
    Join Date
    09-14-2004
    Location
    Jämtland, Sweden
    Posts
    16

    Re: Macro for Comparison

    It would help me to help you if you explained what the problem is...

  7. #7
    Registered User
    Join Date
    11-22-2014
    Location
    US
    MS-Off Ver
    Office 365
    Posts
    83

    Re: Macro for Comparison

    The macro needs to compare the datas in column A and B of the sheets 'Patches' and 'NA' and deletes the data in the 'Patch' sheet that matches with the ones in the 'NA' sheet.
    It should loop with data in the 'patches' sheet with the ones in the 'NA' sheet.
    There are multiple patches (column B) for the same server (Column A). so i want to check whether a server and its patches list in NA sheet matches if so it has to be deleted in the patches sheet.
    I have saved the result data which i want in the 'Result' for your reference.

    Please Login or Register  to view this content.
    this code works but it doesn't work for the patch ''Must Upgrade Product SP Before Applying Patch' alone. I have marked the patch in red.

  8. #8
    Registered User
    Join Date
    09-14-2004
    Location
    Jämtland, Sweden
    Posts
    16

    Re: Macro for Comparison

    1) I'm not sure that I'm following - columns A and B should match? But you only check column B?

    2) I also made an ugly mistake! Instead of
    Please Login or Register  to view this content.
    I had
    Please Login or Register  to view this content.

+ 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. comparison macro
    By beatrice25 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-29-2008, 03:14 PM
  2. Comparison Macro
    By seanmartin26 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2006, 05:57 PM
  3. RE: Comparison Macro
    By Tom Ogilvy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2006, 01:20 PM
  4. Comparison Macro
    By aceensor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2005, 03:13 PM
  5. [SOLVED] Macro for a comparison
    By mike b in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2005, 03:06 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