ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find / findnext question (https://www.excelbanter.com/excel-programming/405397-find-findnext-question.html)

Gary Keramidas

find / findnext question
 
i wrote some code to do a find and find next. i then wanted to use what i found
to find something else within the find / findnext loop. i get an error on the
loop line.

so, i'm guessing i can't use another find within a find / findnext, correct?

--


Gary




Jim Thomlinson

find / findnext question
 
You are correct... Effectively you need to do a find repeatedly in your outer
loop as find next will use the parameters of the last find that was executed.

The other option would be to execute your entire find/findnext loop to
create a single large range object based on everything found. You can then
traverse through that range object and perform your find from there... If you
need a demo or some code just reply...
--
HTH...

Jim Thomlinson


"Gary Keramidas" wrote:

i wrote some code to do a find and find next. i then wanted to use what i found
to find something else within the find / findnext loop. i get an error on the
loop line.

so, i'm guessing i can't use another find within a find / findnext, correct?

--


Gary





Gary Keramidas

find / findnext question
 

thanks for confirming, jim.
--


Gary


"Jim Thomlinson" wrote in message
...
You are correct... Effectively you need to do a find repeatedly in your outer
loop as find next will use the parameters of the last find that was executed.

The other option would be to execute your entire find/findnext loop to
create a single large range object based on everything found. You can then
traverse through that range object and perform your find from there... If you
need a demo or some code just reply...
--
HTH...

Jim Thomlinson


"Gary Keramidas" wrote:

i wrote some code to do a find and find next. i then wanted to use what i
found
to find something else within the find / findnext loop. i get an error on the
loop line.

so, i'm guessing i can't use another find within a find / findnext, correct?

--


Gary








All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com