I have a VBA Worksheet_Change event that is looking at a in-cell dropdown. Based upon that case it is calling a macro to insert an array formula that is 163 characters including spaces. I continue to get a run-time error 1004 - Unable to set the FormulaArray Porperty error. Wondering if someone could be of assistance?
These are the macro's called in the above code
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B25")) Is Nothing Then
Select Case Range("B25")
Case "CARDIO 3 Min. Step Test": InsertArray3min
Case "CARDIO 1 Mile RockPort": InsertArrayRP
Case "CARDIO Ebbeling Test": InsertArrayEB
End Select
End If
End Sub
These are the macro's called in the above code
Code:
Sub InsertArray3min()
Range("C25").Select
Selection.FormulaArray = _
"=IFERROR(INDEX(PFADATA,MATCH(1,(PFADATA[Member Name]='PFA Report'!$B$4)*(PFADATA[PFA Type]='PFA Report'!$D$12)*(PFADATA[Cardio Test]='PFA Report'!$B$25),0),15),"")"
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False, NoHTMLFormatting:=True
End Sub
Sub InsertArrayRP()
Range("C25").Select
Selection.FormulaArray = _
"=IFERROR(INDEX(PFADATA,MATCH(1,(PFADATA[Member Name]='PFA Report'!$B$4)*(PFADATA[PFA Type]='PFA Report'!$D$12)*(PFADATA[Cardio Test]='PFA Report'!$B$25),0),20),"")"
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False, NoHTMLFormatting:=True
End Sub
Sub InsertArrayEB()
Range("C25").Select
Selection.FormulaArray = _
"=IFERROR(INDEX(PFADATA,MATCH(1,(PFADATA[Member Name]='PFA Report'!$B$4)*(PFADATA[PFA Type]='PFA Report'!$D$12)*(PFADATA[Cardio Test]='PFA Report'!$B$25),0),23),"")"
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False, NoHTMLFormatting:=True
End Sub