I'm using autofilter to hide cells which don't meet a criteria and then deleting all visible rows, as this
should be faster than looping each row. The data sets are fairly large, up to 130,000 rows, and up to 20% of the rows being deleted. Actual code is:
Code: Select all
rngHeaderRow.AutoFilter Field:=lngUnitCol, Criteria1:="0", Field:=lngPaidCol, Criteria1:="$0.00", VisibleDropDown:=False
On Error Resume Next ' if no cells in the range are visible, next line will error out
rngAllData.SpecialCells(xlCellTypeVisible).EntireRow.Delete Shift:=xlUp
rngAllData.AutoFilter = False
However I'm concerned about
http://support.microsoft.com/kb/832293/en-us" onclick="window.open(this.href);return false;. It's not clear to me if this means that my source data range can't have more than 8,192 areas (not a problem - it will always be a single continguous range), or if it means that if there are more than 8,192 areas returned by the SpecialCells method (definitely a problem, most of the time there'll be more than 8,192 rows)...anyone have any guidance on this?