LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default AutoFilter /specialcells

Hi

I show two friends how they can delete
empty rows with the first example that is working I send.

After trying it a copple of times both select the whole column
and lost all there data. (funny)

Found a way to avoid a problem with specialcells
If there are more then 8192 ranges the areas.count will be 1

Public Sub DeleteBlankRows()
On Error Resume Next 'In case there are no blanks
If Columns("A").SpecialCells(xlCellTypeBlanks).Areas. Count = 1 Then Exit Sub
Columns("A").SpecialCells(xlCellTypeBlanks).Entire Row.Delete
On Error GoTo 0
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Work around to SpecialCells(xlCellTypeBlanks)... DanF Excel Discussion (Misc queries) 7 June 29th 08 07:36 AM
Specialcells Bruno Uato Charts and Charting in Excel 0 October 7th 05 07:42 PM
VBA ON ERROR does not work with SPECIALCELLS Felix Excel Discussion (Misc queries) 2 April 14th 05 10:43 PM
SpecialCells Doesn't Work in a Function?? Alex J Excel Programming 2 December 3rd 03 08:37 PM
specialcells(xlcelltypeblanks) Neil[_11_] Excel Programming 5 October 9th 03 10:11 AM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"