Pasting an Excel array
Hi,
Gone full circle:
arrnum = Evaluate("=SUMPRODUCT((AGTHistory!A1:A11000=A" & 17 + J & _
")*(AGTHistory!C1:C11000=Main!B5),AGTHistory!K1:K1 1000)")
Worksheets("main").Range("B18:B29").Value = arrnum
the { } in the original formula were the problem!
"ram" wrote:
This seems to be pasting the formula and I only want it to paste the values
"Toppers" wrote:
Hi again,
I tried this with data and computed a non-zero result
arrnum = "=SUMPRODUCT((AGTHistory!A1:A11000=A" & 17 + J & _
")*(AGTHistory!C1:C11000=Main!B5),AGTHistory!K1:K1 1000)"
Worksheets("main").Range("B18:B29").Formula = arrnum
"ram" wrote:
Can someone tell me why this code returns the #value! error
Dim J As Integer, val As Integer, arrnum As Variant
arrnum = Evaluate("{=SUMPRODUCT((AGTHistory!A1:A11000=A" & 17 + J & _
")*(AGTHistory!C1:C11000=Main!B5),AGTHistory!K1:K1 1000)}")
Thanks for any help
This questions is related to my previous post
Worksheets("main").Range("B18:B29").Value = arrnum
|