I am trying to copy rows from one sheet to another using VBA, I need it to check cell in column a if it contains value X and if column C excludes Value Y.
I have come as far to copy it with the first criteria, but not the second.
This is what I have and it won't work...
Sub Copy_2016()
'
'Run Sub Copy_2016()
'
Sheets("Working - 2016").Select
Range("A3:AO6304").ClearContents
For Each Cell In Sheets("Working - Data").Range("A1:A6304,C3:C6304")
If Cell.Value = "2016" And If Not Cell.Value = "HI" Then
matchRow = Cell.Row
Rows(matchRow & ":" & matchRow).Select
Selection.Copy
Sheets("Working - 2016").Select
ActiveSheet.Rows(matchRow).Select
ActiveSheet.Paste
Sheets("Working - Data").Select
End If
Next
End Sub