Hello, does anyone know how to insert an array formula using R1C1 style?
I am attempting to convert the array formula (with absolute/relative references as shown below).
I am attempting to convert the array formula (with absolute/relative references as shown below).
Code:
Sub Insert_Rows()
Dim Sh As Worksheet
Dim End_Row As Long
Dim N As Long
Dim Ins As Long
For Each Sh In ActiveWorkbook.Sheets
If Left(Sh.Name, 9) = "Labor BOE" Then
End_Row = Sh.Range("T" & Rows.Count).End(xlUp).Row
For N = End_Row To 3 Step -1
Ins = Sh.Cells(N, "A").Value
If Ins > 0 Then
With Sh.Range("C" & N)
.FormulaArray = "=IFERROR(INDEX('Staffing Plan'!$K$14:$K$1008, MATCH(0, IF($A$1='Staffing Plan'!$W$14:$W$1008, COUNTIF($C$14:$C14, 'Staffing Plan'!$K$14:$K$1008), ""), 0)),"")"
End With
End If
Next N
End If
Next Sh
End Sub