Sharid
Well-known Member
- Joined
- Apr 22, 2007
- Messages
- 1,064
- Office Version
- 2016
- Platform
- Windows
I am using this bit of code in my loop which deletes duplicates.
This works fine if there are duplicates, if there are no duplicates then it gives an error message.
I was not sure how to write it as a IF statement so, if there are no duplicates then do nothing, else delete duplicates.
VBA Code:
Sheet2.Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
I was not sure how to write it as a IF statement so, if there are no duplicates then do nothing, else delete duplicates.