I have two sheets I am working with. Sheets(1) Column one contains the list of items I want to compare to a Named Range I have on Sheets(2).
Here is the code I am trying to use. It seems like I am not getting to the Named Range on Sheets(2) I keep getting an "Object Variable or With Block Variable not Set"
Here is my code:
My activeSheet is Sheets(1)
Suggestions.. Please
Mozzz
Here is the code I am trying to use. It seems like I am not getting to the Named Range on Sheets(2) I keep getting an "Object Variable or With Block Variable not Set"
Here is my code:
Code:
Sub PostFormulas()
' Search NameRange for EmployeeName if Error Go to next line
Dim Found As Boolean
Found = False
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 11 To FinalRow
MyVariable = Cells(i, 1)
If Sheets(2).Range("Dept_rng").Find(What:=MyVariable) = True Then
Sheets(2).Range("L2:O2").Copy Destination:=Sheets(1).Cells(i, 10)
End If
Next i
End Sub
My activeSheet is Sheets(1)
Suggestions.. Please
Mozzz