I want to creat a macro to copy a formula (in L2) into certain cells in col L based on what is in Col B, and have tried the following, but the Set curCell statement gives a run-time error 13. I have updated MS Office to the latest patches.
For Counter = 5 To 100
Set curCell = Worksheets(“Cases”).Cells(“B”, Counter)
If (curCell.Value) <> “Product” And (curCell.Value) <> “Description” And (curCell.Value) <> “” Then
Range(“L2”).Select
Selection.Copy
Set curCell = Worksheets(“Cases”).Cells(“L”, Counter)
ActiveSheet.Paste
End If
Next Counter