Results 1 to 6 of 6

Moving entire rows to new sheet once item has a status of "Sold"

Threaded View

  1. #1
    Registered User
    Join Date
    09-28-2013
    Location
    West Palm Beach, Florida
    MS-Off Ver
    Excel 2010
    Posts
    3

    Moving entire rows to new sheet once item has a status of "Sold"

    I'm still very new to Macros and I'm looking to have the entire row move and delete from the sheet it is currently on to the Sold sheet once I type in the word sold in column S. I have gotten this to work in other excel sheets that I have but those are only 2 sheet spreadsheets. This one is several tabs and I'm not quite sure if it is possible or not. Any help would be greatly appreciated. I have attached the spreadsheet that I am currently working on and here is an example of macro that I usually use. I use this one and just edit it to the sheets and information that I am moving. I however have had no luck with the spreadsheet with multiple tabs on it.

    Option Explicit
     
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim lngRow As Long, ws As Worksheet, nextrow As Long
    
        If Target.Cells.Count > 1 Then Exit Sub
    
        Application.ScreenUpdating = False
    
        If Not Intersect(Target, Columns("J:J")) Is Nothing Then
            If Target.Value = "Completed" Then
                lngRow = Target.Row
                On Error Resume Next
                With ThisWorkbook
                    Set ws = Worksheets("Completed")
                    If ws Is Nothing Then .Worksheets.Add().Name = "Completed"
                    nextrow = Worksheets("Completed").Cells(Rows.Count, "A").End(xlUp).Row + 1
                End With
                With Sheet1 'code name
                    .Range("A" & lngRow & ":M" & lngRow).Copy Destination:=Worksheets("Completed").Range("A" & nextrow)
                    .Range("A" & lngRow).EntireRow.Delete shift:=xlUp
                End With
            End If
        End If
    
        Application.CutCopyMode = False
        Application.ScreenUpdating = True
        Set ws = Nothing
    End Sub

    Thank you.
    Attached Files Attached Files
    Last edited by JBeaucaire; 09-28-2013 at 12:27 PM. Reason: Added CODE tags, as per Forum Rules. Take a moment to read the Forum Rules in the menu bar above. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Moving rows from one sheet to another according to Status
    By warri0r in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-30-2013, 12:21 PM
  2. Moving entire row from the "Schedule" worksheet to "Completed" worksheet
    By Redveck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2012, 02:30 PM
  3. Applying a "Left" formula to an entire column with heading "ValueCol"
    By aad401 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2012, 04:14 PM
  4. [SOLVED] Delete the Rows If it is Blank cell below Table header "Status"
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2012, 05:55 AM
  5. [SOLVED] EXCEL allow 2 options on status bar e.g. show "Count" + "Sum"
    By LEJM in forum Excel General
    Replies: 1
    Last Post: 08-15-2006, 06:50 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