Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Find Command

Hi
have a look in the VBA help for .find

--
Regards
Frank Kabel
Frankfurt, Germany

"Adam" schrieb im Newsbeitrag
...
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


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
Find Command Mike H. Excel Discussion (Misc queries) 8 March 24th 10 10:10 PM
Find (or Ctrl-F) command Kyle Excel Discussion (Misc queries) 1 November 27th 07 07:12 AM
FIND command Paul Blarmy Excel Discussion (Misc queries) 5 January 6th 07 12:30 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM
FIND Command Neil Shaw Excel Programming 3 November 13th 03 01:01 AM


All times are GMT +1. The time now is 09:57 PM.

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"