PC Review


Reply
Thread Tools Rate Thread

Code takes a long time to process

 
 
Sandy
Guest
Posts: n/a
 
      19th Jun 2008
The following code takes about 20 seconds to process,

Sheets("RecordOfRounds").Range("AllRecords"). _
AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("RecordOfRounds").Range("FilterCriteria"), _
CopyToRange:=Sheets("HomeCourse").Range("FilterDestination"), _
Unique:=False

Names are as follows:-
AllRecords
=OFFSET(RecordOfRounds!$A$52,0,0,COUNTA(RecordOfRounds!$A$52:$A$65536),194)
FilterCriteria =RecordOfRounds!$A$1:$E$2
FilterDestination =OFFSET(HomeCourse!$A$52,0,0,1,194)


The following code processes almost instantaneously,

Sheets("RecordOfRoundsDetailed").Range("AllRecordsDetailed"). _
AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("RecordOfRoundsDetailed").Range("FilterCriteriaDetailed"),
_
CopyToRange:=Sheets("HomeDetailed").Range("FilterDestinationDetailed"),
_
Unique:=False

Names are as follows:-
AllRecordsDetailed
=OFFSET(RecordOfRoundsDetailed!$A$52,0,0,COUNTA(RecordOfRoundsDetailed!$A$52:$A$65536),221)
FilterCriteriaDetailed =RecordOfRoundsDetailed!$A$1:$E$2
FilterDestinationDetailed =OFFSET(HomeDetailed!$A$52,0,0,1,221)

The data involved in both cases is almost the same - why should the first
case take so long?
Any help appreciated.
Sandy

 
Reply With Quote
 
 
 
 
Sandy
Guest
Posts: n/a
 
      19th Jun 2008
Update
On doing a Control + End on sheet "RecordOfRounds" the highlighted cell was
in row 2093 - although it appeared that none of the rows between 70 and 2093
appeared to contain data???

Deleting rows 70 to 2093 seemed to improve the situation.
Down to under 10 seconds now.
Sandy


"Sandy" <(E-Mail Removed)> wrote in message
news:44D88568-F513-4CAD-98AC-(E-Mail Removed)...
> The following code takes about 20 seconds to process,
>
> Sheets("RecordOfRounds").Range("AllRecords"). _
> AdvancedFilter Action:=xlFilterCopy, _
> CriteriaRange:=Sheets("RecordOfRounds").Range("FilterCriteria"), _
> CopyToRange:=Sheets("HomeCourse").Range("FilterDestination"), _
> Unique:=False
>
> Names are as follows:-
> AllRecords
> =OFFSET(RecordOfRounds!$A$52,0,0,COUNTA(RecordOfRounds!$A$52:$A$65536),194)
> FilterCriteria =RecordOfRounds!$A$1:$E$2
> FilterDestination =OFFSET(HomeCourse!$A$52,0,0,1,194)
>
>
> The following code processes almost instantaneously,
>
> Sheets("RecordOfRoundsDetailed").Range("AllRecordsDetailed"). _
> AdvancedFilter Action:=xlFilterCopy, _
>
> CriteriaRange:=Sheets("RecordOfRoundsDetailed").Range("FilterCriteriaDetailed"),
> _
>
> CopyToRange:=Sheets("HomeDetailed").Range("FilterDestinationDetailed"), _
> Unique:=False
>
> Names are as follows:-
> AllRecordsDetailed
> =OFFSET(RecordOfRoundsDetailed!$A$52,0,0,COUNTA(RecordOfRoundsDetailed!$A$52:$A$65536),221)
> FilterCriteriaDetailed =RecordOfRoundsDetailed!$A$1:$E$2
> FilterDestinationDetailed =OFFSET(HomeDetailed!$A$52,0,0,1,221)
>
> The data involved in both cases is almost the same - why should the first
> case take so long?
> Any help appreciated.
> Sandy


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista takes long time to shut down hanging process hhh3h Windows Vista General Discussion 22 16th Apr 2009 06:52 PM
Code takes to long to process Excel 2007 Oggy Microsoft Excel Discussion 1 30th Mar 2008 10:23 PM
System restore process takes a long time veranyon Windows Vista General Discussion 6 11th Feb 2008 11:26 AM
Process takes a long time to connect to SqlServer db Sunil Menon Microsoft ADO .NET 0 5th Feb 2007 12:05 PM
Logon Process Takes a long time in XP SP2 =?Utf-8?B?c3NpbGxz?= Windows XP General 0 2nd Mar 2006 04:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:26 AM.