I watched a video on you tube on how to do this but I don't know what I am doing wrong. I keep getting an error when I go to debug. The first error is on the second line. I am unsure how to upload a mini sheet.
The code used:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
a = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xIUP).Row
For i = 2 To a
If Worksheets("Sheet1").Cells(i, 14).Value = "C" Then
Worksheets("Sheet1").Rows(i).Cut
Worksheets("Complete").Activate
b = Worksheets("Complete").Cells(Rows, Count, 1).End(xIUP).Row
Worksheets("Complete").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("Sheet1").Activate
End If
Next
For i = 2 To a
If Worksheets("Sheet1").Cells(i, 1).Value = "" Then
Rows(i).Delete
End If
Next
End Sub
The code used:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
a = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xIUP).Row
For i = 2 To a
If Worksheets("Sheet1").Cells(i, 14).Value = "C" Then
Worksheets("Sheet1").Rows(i).Cut
Worksheets("Complete").Activate
b = Worksheets("Complete").Cells(Rows, Count, 1).End(xIUP).Row
Worksheets("Complete").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("Sheet1").Activate
End If
Next
For i = 2 To a
If Worksheets("Sheet1").Cells(i, 1).Value = "" Then
Rows(i).Delete
End If
Next
End Sub