I have 2 sheets that each have a column for Task IDs. The first sheet is called PM Tasks and in column "A" I have Task IDs and in column "B" I have the frequency of the tasks to be performed. This is: "Weekly", "Monthly", etc. The second sheet is called "PM Schedule" on this sheet the Task IDs are in column "B". On the first sheet the Task ID is only listed once. It is my Master List of Tasks. The second sheet the Task ID's repeat because they are assigned to Machine IDs and one Task can be assigned to more than one machine. I am trying to lookup the Task ID on the first sheet and find the Frequency which is in Column B and add that Frequency to every occurrence of that Task in the second sheet in Column C. This is what I have so far but I get an error 438 "Object doesn't support this property or method."
In the line: Dic (Cl.value = Cl.Offset(, 1).value)
I would appreciate and help with this. Thank you.
Dim Cl As Range, Dic As Object
Set Dic = CreateObject("Scripting.dictionary")
With Sheets("PM Tasks")
For Each Cl In .Range("A3", .Range("A" & Rows.Count).End(xlUp))
Dic (Cl.value = Cl.Offset(, 1).value)
Next Cl
End With
With Sheets("PM Schedule")
For Each Cl In .Range("B3", .Range("B" & Rows.Count).End(xlUp))
If Dic.Exists(Cl.value) Then Cl.Offset(, 1).value = Dic(Cl.value)
Next Cl
End With
In the line: Dic (Cl.value = Cl.Offset(, 1).value)
I would appreciate and help with this. Thank you.
Dim Cl As Range, Dic As Object
Set Dic = CreateObject("Scripting.dictionary")
With Sheets("PM Tasks")
For Each Cl In .Range("A3", .Range("A" & Rows.Count).End(xlUp))
Dic (Cl.value = Cl.Offset(, 1).value)
Next Cl
End With
With Sheets("PM Schedule")
For Each Cl In .Range("B3", .Range("B" & Rows.Count).End(xlUp))
If Dic.Exists(Cl.value) Then Cl.Offset(, 1).value = Dic(Cl.value)
Next Cl
End With