Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. Dim KeyCells As Range
  3.  
  4. Set KeyCells = Range("B:B")
  5.  
  6. If Not Application.Intersect(KeyCells, Range(Target.Address)) _
  7. Is Nothing Then
  8.  
  9. If (Target.Value = "Complete" Or Target.Value = "On Hold") Then
  10. ActiveCell.EntireRow.Copy
  11. Worksheets("Sheet2").Activate
  12. i = Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row
  13. Worksheets("Sheet2").Cells(i + 1, 1).Select
  14. ActiveSheet.Paste
  15. Worksheets("Sheet1").Activate
  16. ActiveCell.EntireRow.Delete
  17. End If
  18.  
  19. End If
  20. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement