Hi Al
I'm sure I have used this code numerous times in the past but for some reason its not working.
I'm getting a 1004 error on this code:
Code
Sub SplitNew()
'#### Copies Header ####
ThisWorkbook.Sheets("Inbound").Rows("1:1").Copy
ThisWorkbook.Sheets("New").Range("A1").PasteSpecial xlValues
'#### Copies Only New Rows ####
Lastrow = ThisWorkbook.Sheets("Inbound").Range("A" & ThisWorkbook.Sheets("Inbound").Rows.Count).End(xlUp).Row
For i = Lastrow To 2 Step -1
If ThisWorkbook.Sheets("Inbound").Range("T" & i).Value = "N" Then
LastrowN = ThisWorkbook.Sheets("New").Range("A" & ThisWorkbook.Sheets("New").Rows.Count).End(xlUp).Row
ThisWorkbook.Sheets("Inbound").Rows(i & ":" & i).Cut
ThisWorkbook.Sheets("New").Range("A" & LastrowN + 1).PasteSpecial xlValues 'ERROR HERE
Else
End If
Next i
End Sub
Display More
It doesn't matter how I rework it, I still get errors, for example if I do a simple "paste" then I get 438 errors:
Code
Sub SplitNew()
'#### Copies Header ####
ThisWorkbook.Sheets("Inbound").Rows("1:1").Copy
ThisWorkbook.Sheets("New").Range("A1").PasteSpecial xlValues
'#### Copies Only New Rows ####
Lastrow = ThisWorkbook.Sheets("Inbound").Range("A" & ThisWorkbook.Sheets("Inbound").Rows.Count).End(xlUp).Row
For i = Lastrow To 2 Step -1
If ThisWorkbook.Sheets("Inbound").Range("T" & i).Value = "N" Then
LastrowN = ThisWorkbook.Sheets("New").Range("A" & ThisWorkbook.Sheets("New").Rows.Count).End(xlUp).Row
ThisWorkbook.Sheets("Inbound").Rows(i & ":" & i).Cut
ThisWorkbook.Sheets("New").Range("A" & LastrowN + 1).Paste 'ERROR HERE
Else
End If
Next i
End Sub
Display More
If I change the Rows to a range and the Range to a rows still get the errors.
Any ideas, this should work.
Thanks