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: 7
Default understanding the .FIND example

I am having difficulty in understanding the .FIND example in the help files.

With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With

This works fine but in my case I need to do some reordering of rows and then
continue to FINDNEXT. There appears to be a pointer set within the FIND
method which is where the .Findnext(c) starts. My changes mean that the
pointer is set to a row before the found occurrence and thus the .Findnext
repeats
or
at the end of the range the repeat finds a different address for the
c.address from that stored in firstaddress so loops continuously.

Is the pointer addressable, modificable or am I going about it the wrong way?

--
AlanC
 
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
Understanding formula Dig Excel Worksheet Functions 1 July 3rd 08 03:31 PM
Not understanding with/end with davegb Excel Programming 7 March 6th 06 09:42 PM
Not understanding If Not..Then nothing davegb Excel Programming 6 June 14th 05 04:49 PM
Understanding Templates Syed Zeeshan Haider Excel Programming 6 May 25th 05 12:39 AM
Understanding declarations Greg[_16_] Excel Programming 1 January 26th 05 09:35 PM


All times are GMT +1. The time now is 01:30 AM.

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"