+ Reply to Thread
Results 1 to 3 of 3

Keyword Search -> Copy and Paste VBA Macro Issue

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    Palo Alto, CA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Keyword Search -> Copy and Paste VBA Macro Issue

    Hello all!

    I'm trying to search a dense worksheet for certain keywords, then select the entire row in which those keywords appear, and then copy them to a new sheet. The number of keywords is above 10, and sometimes one keyword will appear in several rows, so I would need to copy all of the rows in which it appears.

    I see a few options to do this:

    1.) The 5-line search and cut/paste operations could be performed and looped (i.e text cut and pasted) until the keyword is no longer present, when the macro would then move on to the operations for the next keyword (searching, copying and pasting its row)
    2.) If any of you know how to manipulate the code to simply perform these 5-line operations 10 times (i.e 10x loop) before continuing to the next set of 5-lines that would be IDEAL.
    3.) My current search to "find" the keyword could be changed into a "find all" function, which I havent been able to do but which would be THE IDEAL SOLUTION IF POSSIBLE.

    Please help, I know I seem helpless but I'm in desperate need here. I'm very new at this so my code might be a bit foolish.

    Please Login or Register  to view this content.


    ---------- Post added at 06:20 PM ---------- Previous post was at 06:11 PM ----------

    Also if anyone wants/needs more information to help me out just ask and I'll be happy to oblige!

    ---------- Post added at 06:37 PM ---------- Previous post was at 06:20 PM ----------

    Also the current error message is a compile error: Loop without Do
    Last edited by anonamouse; 08-03-2012 at 08:12 PM. Reason: Made Title more accurate

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: VBA search and copy looping problem

    @ anonamouse

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  3. #3
    Registered User
    Join Date
    08-03-2012
    Location
    Palo Alto, CA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: VBA search and copy looping problem

    Duly noted. Once again, please excuse my level of ignorance

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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