I have a column that I need to add a networkdays formula to. I started to create some code that I thought would work.
Sub Networkdays()
Dim ws As Worksheet
Dim c As Range
Dim lrow As Long
Dim Rng As Range
Dim Range As Range
Worksheets("Moto at Stratix").Activate
With ws
If .Range("N1").Value = "Stratix Diagnostics TAT" Then
For Each c In ws.Range("N2:N" & ws.Cells(ws.Rows.Count, "A").End(xlUp).Row)
If Trim(c.Value) <> "" Then
ActiveCell.FormulaR1C1 = "=NETWORKDAYS("K","L")"
End If
Next c
End If
End With
End Sub
However, I get a syntax error with the formula. What is the best way to resolve this?
Thanks!!
Bookmarks