+ Reply to Thread
Results 1 to 5 of 5

Move "Complete" Items to another sheet in workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    11-18-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    1

    Smile Move "Complete" Items to another sheet in workbook

    I need to complete an Actions list each week. I would like if any items marked "Complete" on the Actions sheet were automatically moved (cut) from the "Actions" sheet and put on the next row of the "Complete" sheet. I have tried to copy advice and failed. I attach a sample worksheet and would be very grateful for advice and help.
    Thanks and regards
    Kathy
    Attached Files Attached Files
    Last edited by KathyWilk; 11-18-2012 at 02:24 PM. Reason: Thank you so much!

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Move "Complete" Items to another sheet in workbook

    Hi Kathy

    Please see attached which includes the following code
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim NR As Long
        If Not Target.Column = 5 Then Exit Sub
        Application.ScreenUpdating = False
        Application.EnableEvents = False
        If Target.Value = "Complete" Then
            Target.EntireRow.Copy
            With Sheets("Complete")
                NR = .Range("A" & .Rows.Count).End(xlUp).Row + 1
                .Range("A" & NR).PasteSpecial
            End With
            Target.EntireRow.Delete
        End If
        Application.ScreenUpdating = True
        Application.EnableEvents = True
    End Sub
    Please note I've moved your Status List to a separate sheet and defined a Named Range called Status to populate Data Validation. Let me know of issues.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

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

    Re: Move "Complete" Items to another sheet in workbook

    The attached code you have on the worksheet seems to work, so I do not know what is the issue.

    Sub CopyCompl()
    Dim ws As Worksheet, ws2 As Worksheet, lRow As Long
    
    Set ws2 = Sheets("Complete")
    Set ws = ActiveSheet
    
    ws.AutoFilterMode = False
    lRow = ws.Range("A" & Rows.Count).End(xlUp).Row
    ws.Range("A2:I" & lRow).AutoFilter field:=5, Criteria1:="Complete"
    
    If ws.Range("A" & Rows.Count).End(xlUp).Row > 2 Then
        ws.Range("A3:I" & lRow).SpecialCells(xlCellTypeVisible).Copy
        ws2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValuesAndNumberFormats
    End If
        Application.CutCopyMode = False
    End Sub

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Move "Complete" Items to another sheet in workbook

    Hi Kathy

    Lets try this again. The code you posted above is not required. In this attachment I've commented it out. Simply change a value in Column E to "Complete" and the line will move.
    Attached Files Attached Files

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

    Re: Move "Complete" Items to another sheet in workbook

    John,
    There must be some slowdown with the site. When I posted mine, there was no any reply, now I can see John's posted a reply.Ohm!

+ 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