cagirish81
New Member
Hi,
I want to define an array formula for range of cells in excel 2007 vba. I am using following vba code but getting error : Unable to set the FormulaArray property of the range class. Plz help..
Sub ArryForm ()
Dim IncFormula As String
IncFormula = "=IFERROR(-INDEX('Data Summary Loc-Wise'!R3C1:R1000C1000, MATCH(R3C1 & R2C1 & R5C,'Data Summary Loc-Wise'!R3C1:R1000C1 & 'Data Summary Loc-Wise'!R3C2:R1000C2 & 'Data Summary Loc-Wise'!R3C4:R1000C4,0),MATCH(RC1,'Data Summary Loc-Wise'!R3C1:R3C1000,0))/10^3,0)"
Range(Cells(7, 2), Cells(10, C + 1)).FormulaArray = IncFormula
End Sub
Thanks in advance..
I want to define an array formula for range of cells in excel 2007 vba. I am using following vba code but getting error : Unable to set the FormulaArray property of the range class. Plz help..
Sub ArryForm ()
Dim IncFormula As String
IncFormula = "=IFERROR(-INDEX('Data Summary Loc-Wise'!R3C1:R1000C1000, MATCH(R3C1 & R2C1 & R5C,'Data Summary Loc-Wise'!R3C1:R1000C1 & 'Data Summary Loc-Wise'!R3C2:R1000C2 & 'Data Summary Loc-Wise'!R3C4:R1000C4,0),MATCH(RC1,'Data Summary Loc-Wise'!R3C1:R3C1000,0))/10^3,0)"
Range(Cells(7, 2), Cells(10, C + 1)).FormulaArray = IncFormula
End Sub
Thanks in advance..