+ Reply to Thread
Results 1 to 4 of 4

Macro to Search column for Text string and Copy Entire Row to another Worksheet

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to Search column for Text string and Copy Entire Row to another Worksheet

    I am new to vba and need help with a spreadsheet I am working on. I would like a macro that searches for the text string "FYI" in column "I" of the worksheet named "Data" and then copies all of the rows containing "FYI" and pastes them in the worksheet named "FYI" starting in A2. I have attached a spreadsheet as an example. I would like to be able to assign the macro to the button titled "FYI" and then I will change the macro to also find rows containing "PSA".

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Macro to Search column for Text string and Copy Entire Row to another Worksheet

    Give this a try

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    01-08-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to Search column for Text string and Copy Entire Row to another Worksheet

    Wow Mike that works perfectly. Thanks! Is there anyway you could insert comments into the code just to describe which lines of code are doing what?

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Macro to Search column for Text string and Copy Entire Row to another Worksheet

    See if this helps

    Please Login or Register  to view this content.

+ 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