Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Improve speed of the routine

Hallo,
since I have a dynamic range and sometimes the range is only a few rows
and to be able to print all in one A4 sheet, I would like to hide the
empty rows:

Sub Minus()
Dim cell As Range
For Each cell In Range("G10:G150")
cell.EntireRow.Hidden = (cell.Value = "")
Next cell
End Sub

it works but it is very slow. Is there a way to improve the speed.
Thanks and Regards
Paul
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Improve speed of the routine

Hi Paul,

Am Fri, 05 Apr 2013 22:34:26 +0200 schrieb Paul:

since I have a dynamic range and sometimes the range is only a few rows
and to be able to print all in one A4 sheet, I would like to hide the
empty rows:


try:

Sub Minus()
Dim LRow As Long
Dim rngC As Range

LRow = Cells(Rows.Count, "G").End(xlUp).Row
Range("G10:G" & LRow).SpecialCells(xlCellTypeBlanks) _
.EntireRow.Hidden = True
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Improve speed of the routine

Thanks Claus,
it is really fast. Much faster then mine.

Regards
Paul

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
Can I improve processing speed of macro Liz Excel Programming 0 June 15th 09 06:01 PM
Improve the speed of copy-paste Alex St-Pierre Excel Programming 3 March 30th 07 12:50 AM
Using an Array instead of a Vlookup to improve speed Frank & Pam Hayes[_2_] Excel Programming 4 August 10th 05 08:01 PM
How can I Improve query speed? John[_60_] Excel Programming 5 October 12th 04 01:00 PM
Howto Improve speed? Andy Excel Programming 0 January 19th 04 04:39 PM


All times are GMT +1. The time now is 03:03 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"