Results 1 to 8 of 8

Thread: VBA Code To Move A Row To A Different Worksheet Within The Same Workbook

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    Copy this to the sheet module of the sheet from which you want to cut the row. And change the destination sheet name as required.

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
    
        If Target.Cells.Count = 1 And Target.Column = 9 And Target.Cells(1).Value = "Y" Then
            Target.EntireRow.Copy Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp)(2)
            Target.EntireRow.Delete xlUp
        End If
        
    End Sub
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  2. #2
    Junior Member
    Join Date
    May 2013
    Posts
    21
    Rep Power
    0
    I am sorry but I cannot get this macro to save. Can you please let me know how to do that? Thanks
    Last edited by Excel Fox; 05-17-2013 at 09:58 PM. Reason: Quote Removed

Similar Threads

  1. Replies: 4
    Last Post: 07-02-2013, 11:32 AM
  2. VBA code to move row to new spreadsheet
    By cdurfey in forum Excel Help
    Replies: 6
    Last Post: 06-10-2013, 10:38 PM
  3. Replies: 2
    Last Post: 01-29-2013, 02:45 PM
  4. Vba Code to find value and paste on certain row
    By jwitte in forum Excel Help
    Replies: 3
    Last Post: 11-28-2012, 08:52 PM
  5. VBA Code to Open Workbook and copy data
    By Howardc in forum Excel Help
    Replies: 16
    Last Post: 08-15-2012, 06:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •