Hi - what are the pro/con of each of these? I believe sumproduct will still pull data from a closed sheet, whereas sumif will not. I'm not sure either is faster or uses less resources than the other on large data sets. I'm also using VBA to populate these formulas with the code below. I've used both options, and they are both painfully slow.
VBA Code:
Option 1
With wsC
.Range(.Cells(3, 26), .Cells(LastrowC, LastColumn)).Formula = "=SUMPRODUCT((Data1=$O3)+0,(Data2=$D3)+0,(Data3=Z$2)+0,(Data4))"
.Range("X3:X" & LastrowC).Formula = "=sum(Z3:AM3)"
End With
Option 2
With wsC
.Range(.Cells(3, 26), .Cells(LastrowC, LastColumn)).Formula =
“=SUMIFS(Data4,Data1,$O3,Data2,$D3,Data3,Z$2)”
.Range("X3:X" & LastrowC).Formula = "=sum(Z3:AM3)"
End With