+ Reply to Thread
Results 1 to 4 of 4

How to filter a list based on another sheet?

  1. #1
    Registered User
    Join Date
    08-19-2009
    Location
    Long Beach
    MS-Off Ver
    CA
    Posts
    43

    How to filter a list based on another sheet?

    Hi;

    I have an Excel file with a list of prospects, say car salesmen

    I have another list with a list of zip codes I wish to target.

    How do I use the list of zip codes (in a separate file) to go through the list of records in the prospect file and delete all the entries without a matching zip code?

    I'm an Excel novice and the only way I can think of is copying over the target zip codes to the first file and running conditional formatting. A more ideal solution would just Hide or Delete the non-matching records (to save me the time of having to manually delete or hide records)

    Thanks!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,832

    Re: How to filter a list based on another sheet?

    You can insert a formula within the prospects sheet which examines each zip code and compares it with your list from the second file - something like this in row 2:

    =IF(ISNA(MATCH(F2,'full_path[filename.xlsx]sheet_name'!A:A,0)),"delete","found")

    assuming the zipcodes are in column F of the prospects file and in column A of the other file. Copy this down as far as required, then you can apply autofilter to this column to either hide or delete those records in one operation.

    Hope this helps.

    Pete

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to filter a list based on another sheet?

    h Delta223. assuming your 1st file is Book1, with zip codes in B2:B10 and the other list is in Book2, with zip codes in B2:B10. try this in Book 1 C2:
    =COUNTIF([Book2]Sheet1!$B$2:$B$10,B2)

    then do an Autofilter. anything that is "0" does not exist in Book2. you can then delete or hide.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    08-19-2009
    Location
    Long Beach
    MS-Off Ver
    CA
    Posts
    43

    Re: How to filter a list based on another sheet?

    Thanks guys! I'll mark this as solved now

+ 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