-
Excel 2010 run time error 91': Object variable or with block ...
Hi All,
I'm getting an error 91 when I try to run this code. I'm missing something simple, but I can't figure out what it is?
Sub FindText2()
Dim rngX As Range
inarr = Range("A1:A50")
For i = 3 To 50
If inarr(i, 1) <> "" Then
Set rngX = Worksheets("PERT CHART (3)").Range("H1:BM150").Find(Cells(i, 1), lookat:=xlPart)
Cells(i, 4) = rngX.Offset(0, 3).Address
End If
Next i
inarr2 = Range("A1:A50")
For i = 3 To 50
If inarr2(i, 1) <> "" Then
Set rngX = Worksheets("PERT CHART (3)").Range("H1:BM150").Find(Cells(i, 5), lookat:=xlPart)
Cells(i, 6) = rngX.Offset(0, 0).Address
End If
Next i
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules