LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default two consescutive finds

recently while trying to find solution I have to configure two consecutive
finds. further on when i want to do findnext of the first find the programme
did findnext of only the second find and not the first one (sorry the
question has become convolute).some extract and comments are given below
the entries data and data1 are interspersed with some other data and the
entries data and data1 are repeated.


the code is something like this
Dim cellsfind As Range
Dim cellsfind1 As Range
Set cellsfind = Cells.Find("data", lookat:=xlWhole)
MsgBox cellsfind 'it is <data
Set cellsfind1 = Cells.Find("data1", lookat:=xlWhole)
MsgBox cellsfind1 'it is <data1
cellsfind1.Select
Set cellsfind = Cells.FindNext(cellsfind)
MsgBox cellsfind 'it is again data1 and not data which I thought it should
be as I used <cellsfind variable
code ends
where do I do the mistake.
ofcourse i solved the problem by a pedestrian and inelegant method of after
the first set of finds looping the same <find codes till the loop reaches
the end of the range (without using find next)

thanks and regards.





 
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
lookup only finds #n/a's Janis Excel Discussion (Misc queries) 4 July 26th 07 11:02 PM
Hiding Rows between two Finds SharonInGa[_2_] Excel Programming 3 March 30th 05 10:57 PM
find next finds too much. No Name Excel Programming 5 January 21st 05 08:00 PM
Only finds first Occurrence Steved[_3_] Excel Programming 2 September 10th 04 01:33 AM
finds and concatenate vikram Excel Programming 3 May 20th 04 02:02 PM


All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"