It counts cells containing anything; if there are none, it deletes the sheet.
In your code,
Range refers to the active worksheet, not the worksheet of the loop variable, which would be![]()
IsEmpty(Range("C9")) ...
![]()
IsEmpty(ws.Range("C9")) ...
Bookmarks