LePrinceCeleste
New Member
Hello @all!
To get around the 256 character limitation of FormulaArray, I tried the trick below to find my full array formula:
Can you please help me?
In advance a big THANKS to all who will take a time for my problem!
To get around the 256 character limitation of FormulaArray, I tried the trick below to find my full array formula:
Everything goes fine until the end without error message, but the replacement was not done as requested.Sub test()
Dim ligneMois
ligneMois = "(IFERROR(MONTH('Rest. (Total)'!R1C1:R999C1),0)=MONTH(R1C9))*(IFERROR(YEAR('Rest. (Total)'!R1C1:R999C1),0)=YEAR(R1C9))*ROW('Rest. (Total)'!R1:R999)"
With Range("J1")
.FormulaArray = _
"=IFERROR(IF(SUMPRODUCT(1111)=0,0," & Chr(10) & _
"INDEX('Rest. (Total)'!R1C1:R999C5,SUMPRODUCT(1111)" & _
",COLUMN('Rest. (Total)'!R1C1))),0)" & _
""
.Replace What:="1111", Replacement:=ligneMois, LookAt:=xlPart
End With
End Sub
Can you please help me?
In advance a big THANKS to all who will take a time for my problem!