Hi all...I am new to the forum and I have a problem that is almost identical to a post that is in this forum from Sept of 2011...but, while the concept is almost identical, I cannot manipulate the code to work for me. I have a product backlog worksheet. Each row contains a product problem. When the value in the Status column (Column D) is equal to 'Done', the user would like to click a button and move all rows with that status to an 'Archive' sheet and then be deleted from the current product backlog sheet. When the rows are added to the archive sheet, the user would like them to be automatically placed on the next open row.
The user is sorting the Status column so all rows with a status = 'Done' are all together.
Another problem is I can't seem to save the macro in the worksheet (I use Excel 2010).
I've included a sample spreadsheet....the code below is what I tried to modify but to no avail....
Thanks for any help that you can give....
Private Sub Worksheet_Change(ByVal Target As Range)
' Code goes in the Worksheet specific module
Dim rng As Range
Dim i As Long
' Set Target Range, i.e. Range("A1, B2, C3"), or Range("A1:B3")
Set rng = Target.Parent.Range("D:D")
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Action if Condition(s) are met (do your thing here...)
If LCase(Target.Value) = "completed" Then
i = Target.Row
Target.EntireRow.Cut Sheets("Sheet3").Cells(Rows.Count, "A").End(xlUp).Offset(1)
Cells(i, "D").EntireRow.Delete
End If
End Sub
Bookmarks