+ Reply to Thread
Results 1 to 10 of 10

Find a list of values within a table, locate & extract matching rows

  1. #1
    Registered User
    Join Date
    07-07-2020
    Location
    Los Angeles, CA
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    8

    Find a list of values within a table, locate & extract matching rows

    I'm preparing a large data set of addresses for use in ArcGIS.

    I need all addresses in the final list to match one of the valid CA zip codes from my list of valid zip codes.

    How can I search for ALL of these zip codes within my data set & identify all rows with matching zips?

    I would like to do this and remove any rows with zips that do not match the list.



    FYI i have been doing this in a weird roundabout manual way:
    Pasting the list of valid zips to the end of the zip code column in my data set, then sorting for duplicates and removing all that are not duplicates.
    Attached Files Attached Files
    Last edited by EverythingAllAtOnce; 07-14-2020 at 07:48 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Find a list of values within a table, locate & extract matching rows

    None of the sample data you provided match with a mailing city in the ZIPS list ...

    Please provide properly representative data (not real names, but mailing cities need to be correct) that contain some matches and some non-matches, preferably all in one workbook rather than split over two. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-07-2020
    Location
    Los Angeles, CA
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    8

    Re: Find a list of values within a table, locate & extract matching rows

    I see, I'm sorry about that!

    I attached one new sample set with two sheets. There should be some matching & non matching zips & city names now.

    Let me know if you have any other questions. Thank you so much!
    Attached Files Attached Files
    Last edited by EverythingAllAtOnce; 07-08-2020 at 07:19 PM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Find a list of values within a table, locate & extract matching rows

    Mmm ... Well, now I have no idea what you want. What results are you expect in for the sample set? Fill these manually abs post again.

  5. #5
    Registered User
    Join Date
    07-07-2020
    Location
    Los Angeles, CA
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    8

    Re: Find a list of values within a table, locate & extract matching rows

    I need to FIND&SELECT any entries from the MAIN DATA SET which have zip codes that MATCH any of the zip codes on the ZIP CODE SAMPLE SET

    Does that make sense?

    I have simplified the data sets and reattached yet again, sorry about that. Thanks
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Find a list of values within a table, locate & extract matching rows

    Where are the expected results? What does find and select look like?

    Sorry, but I didn’t need you to simplify that dataset, I just needed you to manually add your expected results and mark them out clearly so I can see what you are looking for. I cannot see where you have done this.

  7. #7
    Registered User
    Join Date
    07-07-2020
    Location
    Los Angeles, CA
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    8

    Re: Find a list of values within a table, locate & extract matching rows

    Hi,

    Ok I see what you mean, I'm sorry I didn't get that part. Well, I attached a tab called expected results,it might help..

    I guess i didn't really make the backstory clear- I came here with this problem to ask how someone might approach this.

    The very crude way I did it, was as follows:

    I copied and pasted the Zip Code list to the end of the zip code column in my main data set. Then I did a conditional highlight for duplicates. Then I sorted by color, and selected all the zip codes
    which were colored pink.

    Not sure this is what you need in order to help me... not sure I'm saying this all right... Thanks either way for your help.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Find a list of values within a table, locate & extract matching rows

    As modeled on the Main Sample Set sheet the following conditional formatting formula is applied to C2:C24
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    07-07-2020
    Location
    Los Angeles, CA
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    8

    Re: Find a list of values within a table, locate & extract matching rows

    That solution seems perfect. It returns TRUE/FALSE, then I can sort for that & highlight etc.

    Why isn't it working for 90002 & 90006 though?

    I attached "SampleSets (Everythingallatonce) V2" highlighting in RED the cells that should've come up as false.

    I copied and pasted 90002 into the ZipCodeSampleSet & tested for conditional highlighting and it does highlight so I don't think it's a data type issue.



    What do you think?


    THANK YOU!
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Find a list of values within a table, locate & extract matching rows

    Change the rule to this:

    =ISNUMBER(MATCH(VALUE(C2),ZipCodeSampleSet!A$2:A$22,0))

    Those 'numbers' with a green triangle in column C are not numbers, but text. The addition of the VALUE function will overcome this anomaly in your data.

+ 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 data in two tables and extract matching values to a third table
    By bushybob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2019, 12:21 AM
  2. [SOLVED] Find matching text string and copy values from 5-rows below it.
    By javeds in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-29-2014, 03:06 PM
  3. [SOLVED] Extract unique values from a table and list along a row
    By doctorblyth in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-05-2013, 04:33 PM
  4. VBA to locate a column according to sheet name, then extract values into another worksheet
    By JamesGoulding85 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2013, 08:50 AM
  5. [SOLVED] extract only certain values from a list which contains empty rows
    By Teaorchid in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-19-2013, 06:13 PM
  6. Find and list matching values in different sheets
    By MindToAsk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 07:31 AM
  7. How to extract rows from a table list
    By simke in forum Excel General
    Replies: 0
    Last Post: 12-18-2011, 10:13 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