ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoFilter /specialcells (https://www.excelbanter.com/excel-programming/287645-autofilter-specialcells.html)

Ron de Bruin

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





Ron de Bruin

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







Ken Wright

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



Ron de Bruin

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





Ken Wright

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



Ron de Bruin

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





Wei-Dong Xu [MSFT]

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.


Ron de Bruin

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.




Wei-Dong Xu [MSFT]

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.



All times are GMT +1. The time now is 06:59 PM.

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