I have a sheet with rows that extend to about Column AT. In some of the rows, all the cells are populated with "--". I want to delete these rows. Other rows have "--"s but not in every cell. I tried to remove all the "--"s then running this code:
For t = 2 To Workbooks(WorkbookNm).Sheets("--").UsedRange.Rows.Count j = CStr(t)
If Application.CountA(Workbooks(WorkbookNm).Sheets("--").Range("A" & j).EntireRow) = 0 Then
Rows(t & ":" & Workbooks(WorkbookNm).Sheets("--").UsedRange.Rows.Count).Delete
GoTo Step15__2:
End If
It worked, but I had trouble re-adding the "--"s. So I'm wondering if there is a simple way to modify the above code, so that it looks for and deletes rows with only "--" and possibly nothing in the cells (e.g. Column AU and on)?
For t = 2 To Workbooks(WorkbookNm).Sheets("--").UsedRange.Rows.Count j = CStr(t)
If Application.CountA(Workbooks(WorkbookNm).Sheets("--").Range("A" & j).EntireRow) = 0 Then
Rows(t & ":" & Workbooks(WorkbookNm).Sheets("--").UsedRange.Rows.Count).Delete
GoTo Step15__2:
End If
It worked, but I had trouble re-adding the "--"s. So I'm wondering if there is a simple way to modify the above code, so that it looks for and deletes rows with only "--" and possibly nothing in the cells (e.g. Column AU and on)?