F
freddie mac
I have a loop in which I am trying to search for a cell with a cerati
textline ("Sec type"). I want to search the entire spreadsheet but i
it it possible to search only some used range that is preffered. If
find the cell I am lokking for I want to check to see that it is not o
the same row as some other things. These rows are specified b
segment.row and secID.row. My problem is that the loop never stop
running and I do not know what is wrong with it. I guess it is th
Loop-line that is erronous but I do not know how to fix it. Please hel
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 <> firstAddres
And c.row = segment.row Or c.row = secID.row
End If
End Wit
textline ("Sec type"). I want to search the entire spreadsheet but i
it it possible to search only some used range that is preffered. If
find the cell I am lokking for I want to check to see that it is not o
the same row as some other things. These rows are specified b
segment.row and secID.row. My problem is that the loop never stop
running and I do not know what is wrong with it. I guess it is th
Loop-line that is erronous but I do not know how to fix it. Please hel
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 <> firstAddres
And c.row = segment.row Or c.row = secID.row
End If
End Wit