Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a work sheet with 65,536 rows
only the first 12,000 of which have data, but I can't figure out how to delete the empty but active rows. I could do a reverse Find from the end and then delete the trailing Range, but hoped there might be an easier way. I thought the following, from Chapter 5 of Excel 2002 VBA Programmer's Reference, (http://www.wrox.com/WileyCDA/WroxTit...load_code.html) might work (going by the title), but it doesn't. Sub DeleteEmptyRows() Dim rngRow As Range For Each rngRow In ActiveSheet.UsedRange.Rows If WorksheetFunction.CountA(rngRow) = 0 Then rngRow.EntireRow.Delete End If Next rngRow End Sub Hope you can help, Peter |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete row if 2 cells are empty | Excel Discussion (Misc queries) | |||
delete cells column. Delete empty cells | Excel Worksheet Functions | |||
Delete cells not in Active Worksheet | Excel Programming | |||
Delete Rows with Empty Cells with empty column 1 | Excel Programming | |||
delete all EMPTY cells along each COLUMN | Excel Programming |