+ Reply to Thread
Results 1 to 13 of 13

Search Array Terms Copy Row Other Sheet

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Search Array Terms Copy Row Other Sheet

    .
    The following is only selecting the last term in the stated Array of names and pastes that name to the other sheet. Why is it not finding each of the Array names and pasting
    them to the other sheet ? Thank you.

    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Search Array Terms Copy Row Other Sheet

    Because you are pasting to same cell all the time
    Please Login or Register  to view this content.
    Needs to be
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Search Array Terms Copy Row Other Sheet

    You mean

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Search Array Terms Copy Row Other Sheet

    .
    AB33 : Thank you for the response. No go with your suggestion. Sorry.

    jindon : Ok, that works EXCEPT it's copying PETE twice. ???

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Search Array Terms Copy Row Other Sheet

    .

    Never mind. Just saw I had PETE listed twice in the main list. Duh !

    Thanks guys !

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Search Array Terms Copy Row Other Sheet

    What do you mean by

    No go with your suggestion. Sorry?
    You have finnext function and have two pete

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

    Re: Search Array Terms Copy Row Other Sheet

    You are welcome and thanks for the rep.

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Search Array Terms Copy Row Other Sheet

    .
    AB33

    I copied pasted the macro into the workbook. It provided the same results as my macro.

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Search Array Terms Copy Row Other Sheet

    Well, Should the last row be on Worksheets("Central") or Set wSht = Sheets("Intern")?

    If you are copying in to sheet Set wSht = Sheets("Intern"), then

    Please Login or Register  to view this content.
    Although it is technically not wrong, I use Dim strLastRow As long
    Last edited by AB33; 11-13-2018 at 09:44 AM.

  10. #10
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Search Array Terms Copy Row Other Sheet

    .
    It is copying to Sheets("Intern") ... however, it is only copying one name. Not all the names listed in the Array.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Search Array Terms Copy Row Other Sheet

    This line

    Please Login or Register  to view this content.
    and these two lines:

    Please Login or Register  to view this content.
    are the same

    If the intention is the first one, you do not need to use another variable.

  12. #12
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Search Array Terms Copy Row Other Sheet

    .
    This is the line that made the difference :

    Please Login or Register  to view this content.

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Search Array Terms Copy Row Other Sheet

    I understand though, I did not get it why you need this line then

    Please Login or Register  to view this content.
    ?

    I interpreted to mean something when you included it, but looking back, that created some confusion.

+ 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] Remove Rows based upon list of search terms, copy removed rows to new sheet
    By sam103329 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-19-2015, 08:47 PM
  2. Remove Rows based upon list of search terms, copy removed rows to new sheet
    By sam103329 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-26-2013, 10:32 PM
  3. [SOLVED] Macro/s to create Search Bar to filter to search terms entered activated by Command Button
    By JasonRay in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-08-2013, 03:44 PM
  4. Truncate text strings using LEFT and FIND/SEARCH for multiple search terms
    By ngdoherty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2013, 07:51 PM
  5. [SOLVED] Match search terms, and add data in next column. Multi search problem.
    By Wales MB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-23-2013, 06:10 PM
  6. SEARCH for Terms from an Array within a Cell
    By MobiusTrip in forum Excel General
    Replies: 2
    Last Post: 08-03-2010, 12:06 AM
  7. Two search category & two search terms
    By avk in forum Excel General
    Replies: 3
    Last Post: 05-17-2010, 02:32 PM

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