suddenflash
05-03-2012, 10:57 AM
Hi!
I am trying to write code which has to find string combination " Rh" in a cell. Cells are in cycle so the whole coloumn will be searched.
Somehow I get an error message - Object required, but I have refferred to worksheet ... Can someone help me please
Sub otsib rh()
Dim i As Integer
Dim otsi As String
Dim rida As String
i = 0
Do While i < 100
i = i + 1
rida = " Rh"
Set otsi = Worksheets(1).Cells(i, 2).Find(rida, MatchCase:=False)
' just for checking if the code works
`If Not otsi Is Nothing Then
Cells(i, 10).Value = 10
Loop
End Sub
Many thanks ahead
I am trying to write code which has to find string combination " Rh" in a cell. Cells are in cycle so the whole coloumn will be searched.
Somehow I get an error message - Object required, but I have refferred to worksheet ... Can someone help me please
Sub otsib rh()
Dim i As Integer
Dim otsi As String
Dim rida As String
i = 0
Do While i < 100
i = i + 1
rida = " Rh"
Set otsi = Worksheets(1).Cells(i, 2).Find(rida, MatchCase:=False)
' just for checking if the code works
`If Not otsi Is Nothing Then
Cells(i, 10).Value = 10
Loop
End Sub
Many thanks ahead