+ Reply to Thread
Results 1 to 2 of 2

Searching for multiple matching column values

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    1

    Searching for multiple matching column values

    Hello. I only have a bit of VBA experience, and I was hoping you all could help me with a macro that I have been trying to come up with for a few days (with spectacularly poor results).
    I have a spreadsheet with three tabs (Tab1, Tab2, and Tab3). Every value in column A of tab2 is aslo in column A of tab1, but they are not in the same order because tab1 has a lot more rows (like 500,000 more...). I have been trying to come up with a macro that will: 1. look for each value in column A of tab2 in column A of tab1, and 2. copy that whole row to tab3.
    This is really simple to do by hand. I look at cell A1 in tab2, and then go to tab1 and search for the value I just looked at. The search returns a match, and I copy the row and past it into row 1 of tab 3. It really easy to do (basically just a lot of control+c, control+f, control+v), but doing it thousand of time will take a while. Thank you for any help; it is really appreciated.

  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: Searching for multiple matching column values

    Basic technique is to use an empty column on tab1 to do an ISNUMBER/MATCH on the column A values in tab1 to tab2. Then you filter by the results of those formulas and then copy the data to tab3 all at once.

    Please Login or Register  to view this content.
    _________________
    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!)

+ 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