B
Bam
Hi All,
I am trying to put my array formula into my spreadsheet through vba and
can't figure out the correct syntax for it.
It works fine if i leave the formula on the worksheet.
Can you help me??
MySheet.Range(Cells(3, 8), Cells(myrowcount, 8)).FormulaArray =
"=IF((RC[4]+RC[5])=0,(INDEX(R2C44:R2C63,MATCH(TRUE,SUBTOTAL(9,OFFSET(RC44:RC63,,,,COLUMN(RC44:RC63)-MIN(COLUMN(RC44:RC63))+1))>=(RC10),0))),INDEX(R2C44:R2C63,MATCH(TRUE,SUBTOTAL(9,OFFSET(RC44:RC63,,,,COLUMN(RC44:RC63)-MIN(COLUMN(RC44:RC63))+1))>(RC12+RC13),0)))"
Or
=IF((L3+M3)=0,(INDEX($AR$2:$BK$2,MATCH(TRUE,SUBTOTAL(9,OFFSET($AR3:$BK3,,,,COLUMN($AR3:$BK3)-MIN(COLUMN($AR3:$BK3))+1))>=($J3),0))),INDEX($AR$2:$BK$2,MATCH(TRUE,SUBTOTAL(9,OFFSET($AR3:$BK3,,,,COLUMN($AR3:$BK3)-MIN(COLUMN($AR3:$BK3))+1))>($L3+$M3),0)))
Thanks in advance?
Bam.
I am trying to put my array formula into my spreadsheet through vba and
can't figure out the correct syntax for it.
It works fine if i leave the formula on the worksheet.
Can you help me??
MySheet.Range(Cells(3, 8), Cells(myrowcount, 8)).FormulaArray =
"=IF((RC[4]+RC[5])=0,(INDEX(R2C44:R2C63,MATCH(TRUE,SUBTOTAL(9,OFFSET(RC44:RC63,,,,COLUMN(RC44:RC63)-MIN(COLUMN(RC44:RC63))+1))>=(RC10),0))),INDEX(R2C44:R2C63,MATCH(TRUE,SUBTOTAL(9,OFFSET(RC44:RC63,,,,COLUMN(RC44:RC63)-MIN(COLUMN(RC44:RC63))+1))>(RC12+RC13),0)))"
Or
=IF((L3+M3)=0,(INDEX($AR$2:$BK$2,MATCH(TRUE,SUBTOTAL(9,OFFSET($AR3:$BK3,,,,COLUMN($AR3:$BK3)-MIN(COLUMN($AR3:$BK3))+1))>=($J3),0))),INDEX($AR$2:$BK$2,MATCH(TRUE,SUBTOTAL(9,OFFSET($AR3:$BK3,,,,COLUMN($AR3:$BK3)-MIN(COLUMN($AR3:$BK3))+1))>($L3+$M3),0)))
Thanks in advance?
Bam.