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: 244
Default Looper blooper

I have a loop in which I am trying to search for a cell with a ceratin
textline ("Sec type"). I want to search the entire spreadsheet but if it it
possible to search only some used range that is preffered. If I find the cell
I am lokking for I want to check to see that it is not on the same row as
some other things. These rows are specified by segment.row and secID.row. My
problem is that the loop never stops running and I do not know what is wrong
with it. I guess it is the Loop-line that is erronous but I do not know how
to fix it. Please help me out if can! Thanks!

With Range("b1:aa500")
Set c = Worksheets("Beräkning").Cells.Find("Sec type",
LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress And
c.row = segment.row Or c.row = secID.row
End If
End With
 
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
Looper Blooper stendahl_jones Excel Programming 1 June 20th 06 12:34 PM


All times are GMT +1. The time now is 04:19 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"