I am working with a long array formula, and so i am replacing the condition with "X_X" to avoid the 255 character limit. i also have a predefined variable qbb with the actual length of the array being checked, though for this example, i just set it to 150. The full formula itself works fine when i add it manually. The issue is that when i try to do the replacement via VBA, the ".Replace" is not replacing anything. the end result still has the "X_X" and the "114"
Dim frmla As String
Dim qbb As Variant
qbb = 150
frmla = "('Final Summary'!R2C2:R114C2<=R13C4)*('Final Summary'!R2C2:R114C2>=R14C4)*(('Final Summary'!R2C3:R114C3=R10C4)+(R10C4=""""))"
With ActiveSheet.Range("C16")
.FormulaArray = "=IFERROR(INDEX('Final Summary'!R2C1:R114C1,SMALL(IF(X_X,ROW('Final Summary'!R2C1:R114C1)-MIN(ROW('Final Summary'!R2C1:R114C1))+1),ROWS(R16C3:RC))),"""")"
.Replace What:="X_X", Replacement:=frmla
.Replace What:="114", Replacement:=qbb
End With
I also tried the alternate ".Replace" format:
.Replace "X_X", frmla
.Replace "114", qbb
No luck.
Any ideas?
LookAtwill be defaulting to whatever it was last set at, is thatxlPart, orxlWhole?xlPart