Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using macros to condense a template
I had a friend that used to do this and damn it if I can find that
file. Anyway, does anyone know how to condense a spreadsheet using a macro that can select and hide only the rows that are empty. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using macros to condense a template
On Jan 23, 12:38*am, wrote:
I had a friend that used to do this and damn it if I can find that file. *Anyway, does anyone know how to condense a spreadsheet using a macro that can select and hide only the rows that are empty. Try this code. Public Sub hideEmpty() Dim rng As Excel.Range Dim rngCell As Excel.Range With ActiveSheet Set rng = Intersect(.UsedRange, .Range("A:A")) End With For Each rngCell In rng If Application.WorksheetFunction.CountA(rngCell.Entir eRow) = 0 Then rngCell.EntireRow.RowHeight = 0 End If Next rngCell End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macros for template | New Users to Excel | |||
Template with macros | Excel Discussion (Misc queries) | |||
can't find macros in template | Excel Programming | |||
Macros in Template | Excel Programming | |||
Macros in a template | Excel Programming |