abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,430
- Office Version
- 2019
- 2010
- Platform
- Windows
hi
i have this code works well i would if is possible to make it copy rows what contains "not available" in one time in my case i have to press every time each row contains "not available " i find this is not practical and take me more time if i have 1000 rows of data
thanks
i have this code works well i would if is possible to make it copy rows what contains "not available" in one time in my case i have to press every time each row contains "not available " i find this is not practical and take me more time if i have 1000 rows of data
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("F:F")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Lastrow = Sheets("RESULT").Cells(Rows.Count, "F").End(xlUp).Row + 1
If Target.Value = "NOT AVAILABLE" Then
Rows(Target.Row).Copy Destination:=Sheets("RESULT").Rows(Lastrow)
Rows(Target.Row).Delete
End If
End If
End Sub