Thread: Find Command
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Adam[_9_] Adam[_9_] is offline
external usenet poster
 
Posts: 15
Default Find Command

What is the programming for the find command in visual
basic? I want to find a cell that contains the same
value as another cell. I want to know the row number of
the cell. This is what I have but it is way too slow. I
think that if I use the find command instead of Do until
it will be much faster. Thank you

(i is the counter in wks_A)
(n is the counter in wks_S)

For i = 2 To ArcviewFinalRow

n = 2

Do Until (wks_A.Range("B" & i).Value = wks_S.Range("B" &
n).Value Or n = SectionsFinalRow)

n = n + 1
Loop

wks_A.Range("C" & i).Value = wks_S.Range("C" & n).Value

Next i