Re: Can anyone explain to me why built in Cells.Find() is faster than a loop?
- From: "Charles Williams" <Charles@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 7 Nov 2007 19:25:00 -0000
Hi Will,
There is a significant overhead in transferring data from Excel to VBA, but
when you are dealing with methods like .Find that operate directly on Excel
ranges then the data does not need to be transferred. so you avoid the
overhead.
Also Excel's methods such as FIND are written in C language rather than VBA,
which tends to be faster in execution.
(Even faster than Cells.Find is using WorksheetFunction.Match)
When coding in VBA there are generally many different ways of coding the
same task, and some are very much faster than others.
(Come to my session on writing fast User-defined Functions at the UK User
Group Conference to find out more!)
Charles
_________________________________________
UK Cambridge XL Users Conference 29-30 Nov
http://www.exceluserconference.com/UKEUC.html
"Will" <evans.will@xxxxxxxxx> wrote in message
news:1194373555.222668.139260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When coding in VB, why are the built in applications, particularly
Cells.Find(), faster than loops?
.
- References:
- Prev by Date: Re: Cell contents?
- Next by Date: Index, Match, Min and Max question
- Previous by thread: Re: Can anyone explain to me why built in Cells.Find() is faster than a loop?
- Next by thread: Re: Excel 2007 files not opening properly..
- Index(es):