Searching from sheet; cell=variable vs. find(variable)?
Posted by Pasi Vartiainen on November 10, 2000 4:37 AM
Which is faster method, use
for i = 1 to <some number>
if cell(1,1).value= variable then
a=Cells.Find(What:=variable, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=
_xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
Are these methods equeal with speed, or are there some limit where other is faster than other? I mainly ask this because I have texbox which is updated every time some cell is clicked. I use for loop, there are some 300 lines. In my computed speed is not a problem, but I am afraid how slow my code is in computers which are equiped only with 64meg's RAM.
I use cell value from certain row as a key, which I use as a searched variable. If match is found I execute some more code, but thats other story.
So, I am asking, if some-one has information of speed of search, which one is faster, and how much it depend on number of lines?