LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Speed it up?

Hi -

I'm using the code below to remove zero values from a range of
cells ... actually, four ranges of cells. The ranges will be the same
within a workbook, but will differ between workbooks -- so, today's
range could be Row 8 to Row 52, but tomorrow could be Row 8 to Row 61
(ALWAYS starts with Row 8).

For what it's doing, I think the current code is taking WAY too long
to run -- some users report upto 3-4 minutes. All users are using
XL02 on XP ...

Is there anyway to change the code so that it runs faster?

Thanks, Ray

Current Code:
Application.StatusBar = "Removing un-necessary zeroes ..."
ActiveSheet.Range("P8").Activate
Do While IsEmpty(ActiveCell.Value) = False
If ActiveCell.Value = 0 Then
ActiveCell.ClearContents
ActiveCell.Offset(1, 0).Activate
Loop

ActiveSheet.Range("Q8").Activate
Do While IsEmpty(ActiveCell.Value) = False
If ActiveCell.Value = 0 Then
ActiveCell.ClearContents
ActiveCell.Offset(1, 0).Activate
Loop

ActiveSheet.Range("U8").Activate
Do While IsEmpty(ActiveCell.Value) = False
If ActiveCell.Value = 0 Then
ActiveCell.ClearContents
ActiveCell.Offset(1, 0).Activate
Loop

ActiveSheet.Range("V8").Activate
Do While IsEmpty(ActiveCell.Value) = False
If ActiveCell.Value = 0 Then
ActiveCell.ClearContents
ActiveCell.Offset(1, 0).Activate
Loop
 
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
VBA Speed up sparx Excel Discussion (Misc queries) 2 April 29th 06 04:59 PM
Can you speed UP drag speed? Ryan W Excel Discussion (Misc queries) 1 October 24th 05 06:09 PM
Speed tjh Excel Programming 1 December 16th 04 05:49 PM
need for speed! Neil[_19_] Excel Programming 1 May 19th 04 10:25 PM
Speed? Stu[_31_] Excel Programming 11 October 18th 03 09:41 PM


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