Hello,
I'm using the below code to delete entire rows of data that have a value of 0. Is there any way to alter this code to clear the contents of columns A-R if column B=0? Know that the headers on this data set start in row 9.
Sheets("Sheet1").Select
Worksheets("Sheet1").Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row).Name = "Summary"
With Range("Summary")
.AutoFilter Field:=1, Criteria1:="0"
.Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
Worksheets("Summary").AutoFilterMode = False
End With
I'm sure this is something that's super easy, but I'm just not having luck. I'm not able to delete the rows in this instance because there are pivot tables to the right of the data.
TIA!
I'm using the below code to delete entire rows of data that have a value of 0. Is there any way to alter this code to clear the contents of columns A-R if column B=0? Know that the headers on this data set start in row 9.
Sheets("Sheet1").Select
Worksheets("Sheet1").Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row).Name = "Summary"
With Range("Summary")
.AutoFilter Field:=1, Criteria1:="0"
.Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
Worksheets("Summary").AutoFilterMode = False
End With
I'm sure this is something that's super easy, but I'm just not having luck. I'm not able to delete the rows in this instance because there are pivot tables to the right of the data.
TIA!