LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default optimizing code? (hide)

I have a drop-down list from where the user can select which day he
wants to see.

At first I hide everything, after that I run the little procedure
below

The problem that I'm having is that this takes lots of time running
this. How do I change the procedure so it will run faster?

Sub show_days()

Dim compare
Application.ScreenUpdating = False

compare = Range("F10").Value

Range("F13").Select

For n = 1 To 8000
ActiveCell.Offset(1, 0).Select
If ActiveCell.Value = compare Then
ActiveCell.EntireRow.Hidden = False
End If
Next n

Application.ScreenUpdating = True

End Sub

/Johan
 
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
Optimizing mortage payback Hannes Excel Worksheet Functions 0 September 14th 05 09:01 AM
MapPoint Optimizing mak Excel Discussion (Misc queries) 0 August 17th 05 09:30 PM
optimizing a macro The Grinch[_11_] Excel Programming 2 August 4th 04 09:55 AM
optimizing a lookup Yakimo[_2_] Excel Programming 1 May 28th 04 04:02 PM
Optimizing in VB Phil Excel Programming 1 August 8th 03 05:18 PM


All times are GMT +1. The time now is 11:32 PM.

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

About Us

"It's about Microsoft Excel"