+ Reply to Thread
Results 1 to 5 of 5

Remove matching items from a workbook based on a master list

  1. #1
    Registered User
    Join Date
    05-31-2006
    Posts
    58

    Remove matching items from a workbook based on a master list

    I have Workbook A populated with skus from a report and I want to remove all rows in this workbook that do not have a matching sku in Workbook B. Each workbook contains only one sheet and the skus are in column 1 of both workbooks.

    Also, I am looking for a good resource/tutorial for working with workbooks, worksheets and ranges within. I don't anticipate this being the last time I will be confronted with this and would like to learn more.
    Last edited by Apel; 06-16-2009 at 08:20 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Remove matching items from a workbook based on a master list

    In Workbook A put this formula in B1 and the double-click the lower right corner to copy to down the whole dataset:

    =ISNUMBER(MATCH(A1,'[WorkBook B.xls]Sheet1'!$A:$A,0))

    You now have a set of TRUE/FALSE answers. Sort both columns by column B and then delete all the FALSE rows which are now grouped together. Then delete the B column until next time.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-31-2006
    Posts
    58

    Re: Remove matching items from a workbook based on a master list

    Is there a way to accomplish this with a macro? I appears I left that little bit out.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Remove matching items from a workbook based on a master list

    Run this macro from inside Workbook A. Be sure to edit the highlighted section to the actual correct workbook b name.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-31-2006
    Posts
    58

    Re: Remove matching items from a workbook based on a master list

    Thank you. It was much simpler than I was making it.

+ 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