+ Reply to Thread
Results 1 to 5 of 5

Macro needed to search for text, highlight row, then cut & paste to another worksheet

  1. #1
    Registered User
    Join Date
    11-19-2013
    Location
    Surrey, England
    MS-Off Ver
    2010
    Posts
    5

    Macro needed to search for text, highlight row, then cut & paste to another worksheet

    Hi all,

    I'm a bit of a novice and tend to write Visual Basic code using gut instinct, but I've really hit the wall on this one.

    I have a list of work types in column B of Sheet1 and need a macro that will archive certain ones to sheet2. So, I need to search column B for every instance of "Abandoned", for example, then select each row that contains it in turn, cutting the row and pasting it in sequence into the next available row of Sheet2, before deleting the now blank row from Sheet1. Everything I try goes hopelessly wrong!

    Any help would be gratefully received.

    Thanks in advance,

    BoyBri

  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: Macro needed to search for text, highlight row, then cut & paste to another worksheet

    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
    05-27-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Macro needed to search for text, highlight row, then cut & paste to another worksheet

    I think the copy is upside down. (Thats what I got).
    If you want it as in the order of the original sheet, try this:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-19-2013
    Location
    Surrey, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Macro needed to search for text, highlight row, then cut & paste to another worksheet

    Fantastic. Thank you so much to both of you.

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

    Re: Macro needed to search for text, highlight row, then cut & paste to another worksheet

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.

+ 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. Replies: 11
    Last Post: 03-04-2013, 12:57 PM
  2. [SOLVED] Search multiple worksheets for Text String, copy and paste entire row into new worksheet
    By spulliam2000 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-15-2013, 07:52 PM
  3. Search and highlight only containing text
    By sajidbagi in forum Excel General
    Replies: 19
    Last Post: 07-23-2009, 07:22 AM
  4. Copy, Search, Then Paste Needed
    By strato1983 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-27-2009, 02:26 PM
  5. Search for Cell Value N highlight in another worksheet
    By edisonl in forum Excel General
    Replies: 4
    Last Post: 04-07-2008, 08:20 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