p45cal
Well-Known Member
Works on the active sheet, so be careful:
Code:
Sub copyFormula()
Dim ws As Worksheet, cll As Range
Application.Calculation = xlManual
Set ws = ActiveSheet 'Sheets("Sheet1") 'this change means it works on whichever sheet is the active sheet.
Dim form1 As String
form1 = ws.Range("F6").FormulaR1C1
For Each cll In ws.Range("C6:C2533").Cells
If cll.Value = "direct works" Then cll.Offset(, 3).FormulaR1C1 = form1
Next cll
Application.Calculation = xlAutomatic
End Sub