A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi
My other post will copy and transfer to the other sheet.
This one will cut and paste to the other sheet also delete the empty rows.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh2 As Worksheet
Dim sh1 As Worksheet
Dim finalrow As Long
Dim lastrow As Long
Dim i As Long, val as long
Set sh1 = Sheets("TM")
Set sh2 = Sheets("TMC")
Application.EnableEvents = False
finalrow = sh1.Cells(Rows.Count, 1).End(xlUp).Row
If Not Intersect(Target, Range("G:G")) Is Nothing Then
If UCase(Target.Value) = "CLOSED" Then
val = Target.Row
lastrow = sh2.Cells(Cells.Rows.Count, 1).End(xlUp).Row
sh1.Cells(Target.Row, 1).EntireRow.Cut Destination:=sh2.Cells(lastrow + 1, 1)
sh1.Cells(val, 1).EntireRow.Delete
End If
End If
Application.EnableEvents = True
End Sub