+ Reply to Thread
Results 1 to 2 of 2

Move entire row of data from Sheet 1 to sheet 2 when completed date is entered.

  1. #1
    Registered User
    Join Date
    05-18-2013
    Location
    Albany, OR
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Move entire row of data from Sheet 1 to sheet 2 when completed date is entered.

    I have tasks in sheet one that need to be archived into another sheet when completed. I want it to move automatically when a person puts in the complete date. I've tried this code but it doesn't work:
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rngDest As Range
    Set rngDest = Worksheet2.Range("rngDest")
    ' Limit the trap area to range of cells
    If Not Intersect(Target, Sheet1.Range("rngTrigger")) Is Nothing Then
    ' Only trigger if the value entred is a date or is recognizable as a valid date
    If IsDate(Target) Then
    'Ensure subsequent deletion of 'moved' row does NOT cause the Change Event to run again and get itself in a loop!
    Application.EnableEvents = False
    Target.EntireRow.Select
    Selection.Cut
    rngDest.Insert Shift:=xlDown
    Selection.Delete
    ' Reset EnableEvents
    Application.EnableEvents = True
    End If
    End If
    End Sub
    Thanks you!!!!!!!!

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Move entire row of data from Sheet 1 to sheet 2 when completed date is entered.

    attach please a sample file for testing
    If solved remember to mark Thread as solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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