Find Command

A

Adam

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top