C
catlair
Hi,
I have a macro with the following included:
iDataRows = Application.CountA(Range("A:A"))
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(--(LEFT(R2C1:R170C1,2)=""AP""),--(R2C7:R170C7=""Reactive""),
--(R2C11:R170C11=""BD""))"
I wish to substitute all the R170 with the value from iDataRows. I
tried something like this:
"=SUMPRODUCT(--(LEFT("A2:A" & iDataRows,2)=""AP""),--("G2:G" &
iDataRows=""Reactive""), --("A2:A" & iDataRows=""BD""))"
Didn't work... Any suggestions?
I have a macro with the following included:
iDataRows = Application.CountA(Range("A:A"))
ActiveCell.FormulaR1C1 = _
"=SUMPRODUCT(--(LEFT(R2C1:R170C1,2)=""AP""),--(R2C7:R170C7=""Reactive""),
--(R2C11:R170C11=""BD""))"
I wish to substitute all the R170 with the value from iDataRows. I
tried something like this:
"=SUMPRODUCT(--(LEFT("A2:A" & iDataRows,2)=""AP""),--("G2:G" &
iDataRows=""Reactive""), --("A2:A" & iDataRows=""BD""))"
Didn't work... Any suggestions?