ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Blank Rows (https://www.excelbanter.com/excel-programming/325493-deleting-blank-rows.html)

Nigel Bennett

Deleting Blank Rows
 
THis Code Deletes all the blank rows the workbook it
starts at row 1

With ActiveSheet
On Error Resume Next
.Columns("C").SpecialCells
(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End With

How can I set it to start at another row for example row 5

Jim Thomlinson[_3_]

Deleting Blank Rows
 
With ActiveSheet
On Error Resume Next
.Range("C5:C65535").SpecialCells
(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End With

Try that...

HTH
"Nigel Bennett" wrote:

THis Code Deletes all the blank rows the workbook it
starts at row 1

With ActiveSheet
On Error Resume Next
.Columns("C").SpecialCells
(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End With

How can I set it to start at another row for example row 5



All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com