Vba Formula To Include Activesheet Name
Since Cells(5,4) isn't qualified, I'm betting that it's on the activesheet, too:
Cells(5, 4).Formula = "=SUMPRODUCT(($R$" & lr & ":$R$" & br & "=$B$14)" _
& "*($I$" & lr & ":$I$" & br & "0))"
LuisE wrote:
Thanks in advanceHow can I get the following formula to work by making it
reference the name of the active sheet? Where lr and br are variables.
Cells(5, 4).Formula = "=SUMPRODUCT((ActiveSheet!$R$" & lr & ":$R$" & br &
"=$B$14)*(ActiveSheet!$I$" & lr & ":$I$" & br & "0))"
Thanks in advance
--
Dave Peterson
|