PC Review


Reply
Thread Tools Rate Thread

Collapsing filtered macro

 
 
DFrank
Guest
Posts: n/a
 
      30th Jun 2008
i ran a macro, and it deleted a bunch of error cells, but left a bunch of
blank cells such as the following:

a




b




c



how do i get it to collapse to the form:
a
b
c?

Prefereably within the same macro.

Thanks for any help.
 
Reply With Quote
 
 
 
 
Debra Dalgleish
Guest
Posts: n/a
 
      1st Jul 2008
If you sort the range by that column all the blanks should end up at the
bottom.

DFrank wrote:
> i ran a macro, and it deleted a bunch of error cells, but left a bunch of
> blank cells such as the following:
>
> a
>
>
>
>
> b
>
>
>
>
> c
>
>
>
> how do i get it to collapse to the form:
> a
> b
> c?
>
> Prefereably within the same macro.
>
> Thanks for any help.



--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog: http://blog.contextures.com

 
Reply With Quote
 
ryguy7272
Guest
Posts: n/a
 
      4th Jul 2008
this may work for you (if those really are blanks):
Sub HideBlanks()

Dim rng As Range
On Error Resume Next
Range("A1:A20").EntireRow.Hidden = False '< -- Change this range to suit
your needs
Set rng = Range("A1:A20").SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Hidden = True
End If

End Sub

This will unhide the blanks:
Sub UnHideBlanks()

Dim rng As Range
On Error Resume Next
Range("A1:A20").EntireRow.Hidden = False
Set rng = Range("A1:A20").SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Hidden = False
End If

End Sub





Regards,
Ryan---



--
RyGuy


"Debra Dalgleish" wrote:

> If you sort the range by that column all the blanks should end up at the
> bottom.
>
> DFrank wrote:
> > i ran a macro, and it deleted a bunch of error cells, but left a bunch of
> > blank cells such as the following:
> >
> > a
> >
> >
> >
> >
> > b
> >
> >
> >
> >
> > c
> >
> >
> >
> > how do i get it to collapse to the form:
> > a
> > b
> > c?
> >
> > Prefereably within the same macro.
> >
> > Thanks for any help.

>
>
> --
> Debra Dalgleish
> Contextures
> www.contextures.com/tiptech.html
> Blog: http://blog.contextures.com
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent automatic collapsing of "inner" folders when collapsing "outer" folder in Outlook 2003? Sven Claasen Microsoft Outlook Discussion 5 4th Sep 2009 04:09 PM
How to prevent automatic collapsing of "inner" folders when collapsing "outer" folder in Outlook 2003? Sven Claasen Windows XP Help 0 4th Sep 2009 08:28 AM
Collapsing groups in Macro Cunning_Plan Microsoft Excel Programming 7 30th Jul 2009 03:23 PM
Collapsing Grouped rows by Macro =?Utf-8?B?UGhpbGlwIEogU21pdGg=?= Microsoft Excel Programming 1 26th Apr 2006 02:25 PM
Collapsing/Hiding radio and macro buttons =?Utf-8?B?TGFuY2UgR3JheQ==?= Microsoft Excel Misc 3 20th Dec 2005 06:27 PM


Features
 

Advertising
 

Newsgroups
 


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