+ Reply to Thread
Results 1 to 7 of 7

Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

  1. #1
    Forum Contributor
    Join Date
    10-17-2014
    Location
    EU
    MS-Off Ver
    2013
    Posts
    114

    Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

    I started with
    Please Login or Register  to view this content.
    But cannot figure out to implement to delete rows in Sheet1 once they are copied.

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

    Re: Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

    rng.EntireRow.delete

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

    Try this:

    Please Login or Register  to view this content.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,338

    Re: Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

    Also don't forget at the end of your code.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-17-2014
    Location
    EU
    MS-Off Ver
    2013
    Posts
    114

    Re: Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

    Thank you for the solution.
    The problem occurs if two cells containing "Finished" are bellow each other (eg. E8, E9), it copies and deletes only one, therefore have to click macro twice.

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

    Then you'll have to rewrite your macro to go from bottom to the top?

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

    Re: Find string in column in Sheet1, copy entire row to Sheet 2 and delete in Sheet 1

    This task should be done using a filter. No need to loop and complicate the job. No even need a code.

    Option Explicit

    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)

Similar Threads

  1. [SOLVED] Need to copy a row from Sheet1 to Sheet2 then auto delete from Sheet 1 based on Column G
    By jingles9 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2015, 08:11 AM
  2. Search Column A & C for string and copy entire row to new sheet
    By ludsonline in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2014, 02:43 AM
  3. Search string in a column then copy entire rows to another sheet
    By vannylette in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2013, 12:16 PM
  4. [SOLVED] Copy the entire row from one sheet to another if column A contains string B
    By roman87 in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 10-17-2013, 09:09 AM
  5. Sheet1 if date match, copy entire row to new sheet
    By moxman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-10-2013, 05:51 PM
  6. Copy certain data from Sheet1 to Sheet 2 based on values in a column on Sheet1
    By theglitch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 01:28 PM
  7. [SOLVED] Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row
    By dmlovic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2012, 08:42 AM

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