Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default AutoFilter /specialcells

Sorry about this one

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



"Ron de Bruin" wrote in message ...
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






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default AutoFilter /specialcells

rotflmao

and lost all there data. (funny)


Was this their words Ron, or your interpretation of the nice things they called
you :-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Ron de Bruin" wrote in message
...
Sorry about this one

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



"Ron de Bruin" wrote in message

...
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








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default AutoFilter /specialcells

Hi Ken

In this case(autofilter) the Undo button make them happy again<g

and lost all there data

I was hoping that it happen<g
We both learn from it


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



"Ken Wright" wrote in message ...
rotflmao

and lost all there data. (funny)


Was this their words Ron, or your interpretation of the nice things they called
you :-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Ron de Bruin" wrote in message
...
Sorry about this one

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



"Ron de Bruin" wrote in message

...
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








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default AutoFilter /specialcells

LOL - Now show then how to do it with a macro and then watch them try to undo it
:-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Ron de Bruin" wrote in message
...
Hi Ken

In this case(autofilter) the Undo button make them happy again<g

and lost all there data

I was hoping that it happen<g
We both learn from it


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



"Ken Wright" wrote in message

...
rotflmao

and lost all there data. (funny)


Was this their words Ron, or your interpretation of the nice things they

called
you :-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Ron de Bruin" wrote in message
...
Sorry about this one

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



"Ron de Bruin" wrote in message

...
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








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default AutoFilter /specialcells

No macro Ken

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



"Ken Wright" wrote in message ...
LOL - Now show then how to do it with a macro and then watch them try to undo it
:-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Ron de Bruin" wrote in message
...
Hi Ken

In this case(autofilter) the Undo button make them happy again<g

and lost all there data

I was hoping that it happen<g
We both learn from it


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



"Ken Wright" wrote in message

...
rotflmao

and lost all there data. (funny)

Was this their words Ron, or your interpretation of the nice things they

called
you :-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"Ron de Bruin" wrote in message
...
Sorry about this one

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



"Ron de Bruin" wrote in message
...
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








---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default AutoFilter /specialcells

Hi Ron,

Thank you for posting in MSDN managed newsgroup!

I am quite sure which sample you are working on now. It will be greatly
appreciated you tell me that. Furthermore, if you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
some of assistance.

Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default AutoFilter /specialcells

This posting was a not for this group Wei-Dong .
I posted it by accident


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



"Wei-Dong Xu [MSFT]" wrote in message ...
Hi Ron,

Thank you for posting in MSDN managed newsgroup!

I am quite sure which sample you are working on now. It will be greatly
appreciated you tell me that. Furthermore, if you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
some of assistance.

Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default AutoFilter /specialcells

Hi Ron,

Thank you for the replying!

If you have any questions, please feel free to let me know. I am glad to be
of some assistance.

Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Reply
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 02:04 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"