+ Reply to Thread
Results 1 to 5 of 5

VBA loop to compare two lists and modify cells in rows that don't match

  1. #1
    Registered User
    Join Date
    10-02-2014
    Location
    London, England
    MS-Off Ver
    MS Office 2010
    Posts
    7

    VBA loop to compare two lists and modify cells in rows that don't match

    Hi all,

    There is probably a very easy solution to this but I just don't know enough VBA to solve it.

    I have two lists. List 1 is automatically updated. Before this happens it is copied over to create List 2 as a backup.

    These lists will always have the same number of records.

    I wish to put a button that when pressed deletes the "Notes" cell in List 1 for every record that doesn't match List 2.

    I have tinkered around with a few loops but simply don't know enough to work it out.

    I have attached a demo file that should show the problem better than I can explain it.

    Thanks for all your help guys.
    Last edited by Mutt0nJeff; 10-09-2014 at 10:25 AM.

  2. #2
    Registered User
    Join Date
    10-02-2014
    Location
    London, England
    MS-Off Ver
    MS Office 2010
    Posts
    7

    Re: VBA loop to compare two lists and modify cells in rows that don't match

    Apologies, Ignore the last attachment. Take this one...it is much less confusing.

    Loop List Updated.xlsx

  3. #3
    Registered User
    Join Date
    10-02-2014
    Location
    London, England
    MS-Off Ver
    MS Office 2010
    Posts
    7

    Re: VBA loop to compare two lists and modify cells in rows that don't match

    Bump No Response

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,900

    Re: VBA loop to compare two lists and modify cells in rows that don't match

    Try this:
    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    10-02-2014
    Location
    London, England
    MS-Off Ver
    MS Office 2010
    Posts
    7

    Re: VBA loop to compare two lists and modify cells in rows that don't match

    Thank you alansidman. You have provided the perfect solution.

+ 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. Compare/Match two lists with multiple variables
    By cjwe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2013, 07:29 AM
  2. [SOLVED] Compare two lists in Sheet 1 & 2 Column A, then combine the match adjacent cells in sheet3
    By Raulus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-06-2013, 08:51 AM
  3. Replies: 4
    Last Post: 12-04-2012, 04:45 PM
  4. compare rows value if true than add rows value else start with new loop
    By manmeet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2011, 03:15 AM
  5. Compare two lists and give exact match
    By mccrimmon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-25-2008, 07:46 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