I am getting run-time error '91' when I run this. I click debug and the following line is highlighted in yellow:
Columns(2).Find(what:="TOTAL COSTS").Select
Is there anything wrong with my syntax? What am I doing wrong?
Columns(2).Find(what:="TOTAL COSTS").Select
Is there anything wrong with my syntax? What am I doing wrong?
Code:
Sub findTotalCosts2008()
Dim c As Range
Dim lookup As Range
Set lookup = Worksheets("Schedule I").Range("A6")
For Each c In Worksheets("Schedule K - 2008 Final").Range("D:D")
If c.Value = lookup.Value Then
Columns(2).Find(what:="TOTAL COSTS").Select
Worksheets("Schedule I").Range("X6").Value = Selection.Offset(0, 7).Value
Selection.Clear
'Exit for each
End If
Next c
End Sub