+ Reply to Thread
Results 1 to 3 of 3

Copy and Paste entire row based on multiple text strings

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Copy and Paste entire row based on multiple text strings

    Hello all,

    I'm relatively new to VBA and I've been learning through trial and error and other posts on this forum for the past 4 or 5 months. I have run into a problem that I cannot seem to solve no matter how much I tweak different .find or if statements.

    I need a VBA script that will search through columns Q and R for cells containing the words "terminated" "termination" "resigned" "resign" "redundant" "released" or "cancel enrollment" that appear in larger text strings like: "Employee resigned on 10/01".

    I need the entire rows where these cells are located to be copied, pasted onto a seperate sheet, and then deleted off the original sheet.

    Any help or suggestions would be appreciated or links to similar threads (I've searched through a lot).

    Thanks!
    Last edited by Mr_Kite; 10-19-2012 at 09:54 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy and Paste entire row based on multiple text strings

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Copy and Paste entire row based on multiple text strings

    This works perfectly. Thank you so much!

+ 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