ItalianPlatinum
Well-known Member
- Joined
- Mar 23, 2017
- Messages
- 793
- Office Version
- 365
- 2019
- Platform
- Windows
Hello - I am attempting to clear contents of cells efficiently. Below is what I have but I am erroring out on the highlighted section. giving me a runtime error. i dont want to select, or activate any worksheets. trying to speed things up as best i can. just trying to clear contents of all data in Cells A starting on A13, E13:K13 and L14:X14. then everything in my compare data sheet.
VBA Code:
Sheets("Compare").Unprotect
With Sheets("Compare")
.Range("A13:A" & .Range("A" & rows.count).End(xlDown).row).ClearContents
End With
[B]With Sheets("Compare")
.Range("E13:K", .Range("E" & rows.count).End(xlDown).row).ClearContents
End With
With Sheets("Compare")
.Range("L14:X", .Range("L" & rows.count).End(xlDown).row).ClearContents
End With[/B]
With Sheets("Compare_DATA")
.Range("A:Z").ClearContents
End With