I have the following code that I would assume should clear Row 2+ from all except the Summary sheet, which I'd like to trigger while on the Summary sheet. However it seems to bedoing the opposite - it's ONLY clearing the Summary sheet.
Can anyone tell me what's wrong here?
![]()
Sub Test() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If Not ws.Name = "Summary" Then Rows("2:" & Rows.Count).ClearContents End If Next ws End Sub
Bookmarks