Hi there,
I've been trying to use the method showed in Daily Dose of Excel » Blog Archive » Entering Long Array Formulas in VBA this whole day to overcome the error
"Unable To Set The Formulaarray Property Of The Range Class - Error 1004"
but still to no avail. I just don't know what else I've been missing here? I think if it's still about the chars limit, I have splitted the formulas to the smaller pieces already and I know this formula works fine in the sheet cell. Appreciate some help, please?
I've been trying to use the method showed in Daily Dose of Excel » Blog Archive » Entering Long Array Formulas in VBA this whole day to overcome the error
"Unable To Set The Formulaarray Property Of The Range Class - Error 1004"
but still to no avail. I just don't know what else I've been missing here? I think if it's still about the chars limit, I have splitted the formulas to the smaller pieces already and I know this formula works fine in the sheet cell. Appreciate some help, please?
Code:
Sub TieringAll()
Dim FormulaPart1 As String
Dim FormulaPart2 As String
Dim FormulaPart3 As String
Dim FormulaPart4 As String
Dim FormulaPart5 As String
Dim FormulaPart6 As String
Dim FormulaPart7 As String
Dim FirstHalf As String
Dim SecondHalf As String
FormulaPart1 = "=IF(OR($D5="""",$I5="""",AND($E5=""TL"",$W5<>""-"")),"""","
FormulaPart2 = "IF(OR(ISNUMBER(SEARCH(""TAT"",N$4))," & _
"ISNUMBER(SEARCH(""Suspense"",N$4)),"
FormulaPart3 = "OR(ISNUMBER(SEARCH(""Pender"",N$4))," & _
"ISNUMBER(SEARCH(""Accuracy"",N$4)))),"
FormulaPart4 = "IF(I5>(INDEX(PI_Chart_Details!$E$1:$E$189,"
FormulaPart5 = "MATCH(1,(TRUE=ISNUMBER(SEARCH" & _
"(PI_Chart_Details!$D$1:$D$189,N$4)))"
FormulaPart6 = "*(TRUE=ISNUMBER(SEARCH" & _
"(PI_Chart_Details!$B$1:$B$189,$B5)))"
FormulaPart7 = "*(""Tier 1""=PI_Chart_Details!$F$1:$F$189),0)))," & _
"""Tier 0"",""TierUnknown"")))"
FirstHalf = FormulaPart1 & FormulaPart2 & FormulaPart3
SecondHalf = FormulaPart4 & FormulaPart5 & FormulaPart6 & FormulaPart7
ActiveSheet.Range("M5:M8").FormulaArray = FirstHalf & SecondHalf
End Sub