Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Collapsing filtered macro
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. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Collapsing filtered macro
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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Collapsing filtered macro
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
collapsing rows | Excel Worksheet Functions | |||
using macro to copy and paste filtered results, what if blank? | Excel Worksheet Functions | |||
Expanding and Collapsing | Excel Discussion (Misc queries) | |||
Collapsing/Hiding radio and macro buttons | Excel Discussion (Misc queries) | |||
Prevent A Macro From Running If SpreadSheet is Filtered | Excel Worksheet Functions |