Variable used in a =SUMIF() function?
On Sep 10, 1:30*pm, circuit_breaker
wrote:
Hi,
How do I replace the "A40" parameter with the nLastrow varable below?
* nLastrow = 100
* objExcel.ActiveSheet.Range("D20").Formula = "=SUMIF
* (A4:A40,""'5734' "",B4:B40)"
I've been trying many things with double-double quotes but nothing
works.
Thanks.
This worked:
ActiveSheet.Range("D20").formula="=SUMIF(A4:A"&nRo w
&",""'5734'"",B4:B41)"
|