Hi,
I am trying to create .arrayformula from this:
I've did this:
But it doesn't work.
Could anyone check?
P.S. My formula has total 235 chars. I don't understand why it doesn't work. Could it be written shorter?
I am trying to create .arrayformula from this:
Code:
Sheets("Procurement report").Range("AC19").FormulaArray = "=IFERROR(INDEX(CommentsTable[Comment]:CommentsTable[Comment],MATCH(1,(CommentsTable[Purchase Requisition]:CommentsTable[Purchase Requisition]=B19)*(CommentsTable[Item of requisition]:CommentsTable[Item of requisition]=C19),0)),"""")"
I've did this:
Code:
longformula1 = "=IFERROR(INDEX(XXX:XXX,MATCH(1,(CommentsTable[Purchase Requisition]:CommentsTable[Purchase Requisition]=B19)*(AAA:AAA=C19),0)),"""")"
longformula3 = "CommentsTable[Item of requisition]:CommentsTable[Item of requisition]"
longformula2 = "CommentsTable[Comment]:CommentsTable[Comment]"
With Sheet1.Range("AC19")
.FormulaArray = longformula1
.Replace "XXX:XXX", longformula2
.Replace "AAA:AAA", longformula3
End With
But it doesn't work.
Could anyone check?
P.S. My formula has total 235 chars. I don't understand why it doesn't work. Could it be written shorter?