+ Reply to Thread
Results 1 to 5 of 5

Remove line items if not found in another list

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Davenport, Iowa
    MS-Off Ver
    Excel 365
    Posts
    203

    Remove line items if not found in another list

    Hi,

    I have three sheets, Main, Archive and DB2, I am looking for a vba script to match the values in Column A and Column B found in Orders, and check to see if they exist in the sheet DB2. If the values do not exist in DB2, then remove them from the Orders sheet and move the whole row (A:K) to the Archive sheet with a date added to column J stating when the item was closed. Please keep in mind this has to be done on a data set where I have at least 30K rows... Any help would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    1,911

    Re: Remove line items if not found in another list

    If you're on Windows, this might work for you. Make sure you change the names of the sheets as appropriate.

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Davenport, Iowa
    MS-Off Ver
    Excel 365
    Posts
    203

    Re: Remove line items if not found in another list

    So I found one catch, this will bomb out when I hit a #N/A in the Order Sheet, can this be modified to ignore #N/A's, or do I need to write something to clean the data set up first?

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    1,911

    Re: Remove line items if not found in another list

    Can you post a sample sheet that includes #N/A values? I can then make the change.

    WBD

  5. #5
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    1,911

    Re: Remove line items if not found in another list

    Give this more tolerant version a try:

    Please Login or Register  to view this content.
    WBD

+ 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. Remove Values not found in another list
    By sriley5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2019, 05:24 PM
  2. Help with finding items in a List and adding items not found
    By DawaiDost in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-29-2016, 10:56 AM
  3. [SOLVED] filter pivot table for items in a list in another workbook if found
    By simarui in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2015, 05:35 PM
  4. [SOLVED] Macro to remove items in line, and repopulate with lower cell information.
    By scottatbuckman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2014, 09:36 AM
  5. Making a list from specific items found in document
    By princecanthony in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-27-2013, 11:46 PM
  6. Replies: 1
    Last Post: 07-11-2012, 01:17 PM
  7. Create a search box that jumps to items found in list
    By cadmancan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-27-2009, 11:44 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