+ Reply to Thread
Results 1 to 6 of 6

VBA to search for multiple values in one sheet then copy to another sheet

  1. #1
    Forum Contributor
    Join Date
    06-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2016
    Posts
    124

    VBA to search for multiple values in one sheet then copy to another sheet

    Hi there
    Here’s the issue:

    I have three sheets….
    Sheet1 has the Data
    Sheet 2 is blank
    Sheet3 has the search Names {there are about 100 rows with name values}

    I want to search Sheet1 for all occurrences of where the name values from Sheet3 might occur, and then copy them to Sheet2.
    I have no idea where to start because I need the search to loop to search for the next name value from Sheet3.

    I have attached an example of the workbook layout; however there is no code.
    I know how to do a basic search and copy code, but I am unsure how this will work when the search value is held in 100+ rows on Sheet3.

    Here’s a little sample of what I am trying to do…….


    SHEET 1: (has many rows of data i need to search through)
    SHEET 2: (is currently blank, and is where the output from the search will go)
    SHEET 3: (has Coloum "A' filled with rows of names like DLPTPAYR or DLSYCNTY. These are table names, and I am searching a script from SHEET1 to see if these table names from SHEET3 appear on SHEET1 then copy them to SHEET2.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: VBA to search for multiple values in one sheet then copy to another sheet

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VBA to search for multiple values in one sheet then copy to another sheet

    Try this
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2016
    Posts
    124

    Re: VBA to search for multiple values in one sheet then copy to another sheet

    I have now found that the data source is actually spread over multiple columns not just A.
    Is that an issue?

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VBA to search for multiple values in one sheet then copy to another sheet

    Quote Originally Posted by DanzaNZ View Post
    I have now found that the data source is actually spread over multiple columns not just A.
    Is that an issue?
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2016
    Posts
    124

    Re: VBA to search for multiple values in one sheet then copy to another sheet

    Thank you Jindon
    Truly amazing help!
    Much appreciated!

+ 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. [SOLVED] Search a column within 1 sheet for text values if true copy that row to sheet 2
    By m77wls in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-19-2015, 05:32 PM
  2. Replies: 3
    Last Post: 03-31-2014, 01:00 PM
  3. Search word and copy line from multiple sheet to single sheet
    By drtorn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2012, 01:35 AM
  4. [SOLVED] Looking for vba code that will search sheet for a value on a row and copy other values.
    By Justin25150 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2012, 12:34 PM
  5. Search for Non-Duplicate Values Then Copy Row to Another Sheet
    By Stonesteel15 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-28-2012, 07:31 AM
  6. Search for Multiple String Values on Multiple Sheets and Copy Rows to New Sheet
    By rrtikker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2012, 12:21 PM
  7. Search for multiple string values and copy row to new sheet
    By steeley7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2011, 04:00 AM

Tags for this Thread

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