Sunday, 18 August 2013

Excel VBA - Search certain column for a #N/A, copy entire row to new sheet and delete row

Excel VBA - Search certain column for a #N/A, copy entire row to new sheet
and delete row

This is what I have already. It searches column B in sheet 1 for #N/A and
deletes the row.
Sub DeleteErrorRows()
On Error Resume Next
Range("B:B").SpecialCells(xlCellTypeConstants, 16).EntireRow.Delete
On Error GoTo 0
End Sub
What I would like is for it to copy that row onto sheet 2 and then delete?
So I can have a record of what was deleted.
Any help would be much appreciated. Thanks!

No comments:

Post a Comment