I have a formula that I'm trying to loop through an array in cell B4, E4, and H4.
I haven't tried doing this with an
This is what I have:
I'm getting "Unable to set the FormulaArray property of the Range class".
I haven't tried doing this with an
FormulaArray
before, and I think it might be throwing me off.This is what I have:
VBA Code:
Dim i As Long
Dim rng As Range
Dim var As Variant
var = Array("""SA""", """SV""", """PA""")
Set rng = Range("B4")
For i = 0 To 6
rng.Offset(0, i + 3).FormulaArray = "=SUM(--(MMULT(--IF((Employees!$C$4:$C$3000=RIGHT(A4,3))*(Employees!$H$4:$H$3000=" & dept & "),(Employees!$K$4:$N$3000=""N""),0),TRANSPOSE(COLUMN(Employees!$K$4:$N$3000)^0))>0))"
Next i
I'm getting "Unable to set the FormulaArray property of the Range class".