Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Code takes a long time to process

The following code takes about 20 seconds to process,

Sheets("RecordOfRounds").Range("AllRecords"). _
AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("RecordOfRounds").Range("Fil terCriteria"), _
CopyToRange:=Sheets("HomeCourse").Range("FilterDes tination"), _
Unique:=False

Names are as follows:-
AllRecords
=OFFSET(RecordOfRounds!$A$52,0,0,COUNTA(RecordOfRo unds!$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("AllRecords Detailed"). _
AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("RecordOfRoundsDetailed").Ra nge("FilterCriteriaDetailed"),
_
CopyToRange:=Sheets("HomeDetailed").Range("FilterD estinationDetailed"),
_
Unique:=False

Names are as follows:-
AllRecordsDetailed
=OFFSET(RecordOfRoundsDetailed!$A$52,0,0,COUNTA(Re cordOfRoundsDetailed!$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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Code takes a long time to process

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" wrote in message
...
The following code takes about 20 seconds to process,

Sheets("RecordOfRounds").Range("AllRecords"). _
AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("RecordOfRounds").Range("Fil terCriteria"), _
CopyToRange:=Sheets("HomeCourse").Range("FilterDes tination"), _
Unique:=False

Names are as follows:-
AllRecords
=OFFSET(RecordOfRounds!$A$52,0,0,COUNTA(RecordOfRo unds!$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("AllRecords Detailed"). _
AdvancedFilter Action:=xlFilterCopy, _

CriteriaRange:=Sheets("RecordOfRoundsDetailed").Ra nge("FilterCriteriaDetailed"),
_

CopyToRange:=Sheets("HomeDetailed").Range("FilterD estinationDetailed"), _
Unique:=False

Names are as follows:-
AllRecordsDetailed
=OFFSET(RecordOfRoundsDetailed!$A$52,0,0,COUNTA(Re cordOfRoundsDetailed!$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
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
Code takes to long Oggy Excel Discussion (Misc queries) 1 March 30th 08 10:56 PM
Clearing cells takes long, long time unclemuffin Excel Discussion (Misc queries) 9 August 17th 07 02:22 AM
Clearcontents takes long, long, time Fid[_2_] Excel Programming 3 August 15th 07 12:40 AM
how do i add time to see how long my macro takes to run ernestgoh[_6_] Excel Programming 2 July 16th 06 11:05 AM
Save takes long time Jan Excel Discussion (Misc queries) 2 February 15th 06 06:01 PM


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