Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 256
Default 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
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
Macros for template Mike New Users to Excel 1 November 21st 09 07:35 PM
Template with macros reddog9069 Excel Discussion (Misc queries) 2 July 19th 05 03:51 PM
can't find macros in template richperfect Excel Programming 1 September 3rd 04 03:42 PM
Macros in Template Dick Johnson Excel Programming 2 December 22nd 03 11:34 PM
Macros in a template Michelle Excel Programming 1 October 16th 03 01:54 PM


All times are GMT +1. The time now is 04:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"