Hi all
I want to use sumproduct formula in approx. 50,000 cells, but asking excel to calculate this "kills" excel.
Is there anyway I can use this formula in VBA so instead of adding the formula to each cell and then calculating the value for each cell, it just calculates the value in vba and places it in the appropriate cell.
Current working excel formula is as follows...
=IF($A5="","",SUMPRODUCT(--($A5=Sheet1!$CC$2:$CC$5028)*(C$2=Sheet1!$AD$2:$AD$5028)*($B5=Sheet1!$H$2:$H$5028))+SUMPRODUCT(--($A5=Sheet1!$CC$2:$CC$5028)*(C$2=Sheet1!$AW$2:$AW$5028)*($B5=Sheet1!$H$2:$H$5028)))
$A5 will be over the range of $A5 to $A3716
$B5 will be over the range of $B5 to $B3716
C$2 will be over the range of C$2 to ES$2
and the result of this calculation will be placed in C5:ES3716
Thanks.
I want to use sumproduct formula in approx. 50,000 cells, but asking excel to calculate this "kills" excel.
Is there anyway I can use this formula in VBA so instead of adding the formula to each cell and then calculating the value for each cell, it just calculates the value in vba and places it in the appropriate cell.
Current working excel formula is as follows...
=IF($A5="","",SUMPRODUCT(--($A5=Sheet1!$CC$2:$CC$5028)*(C$2=Sheet1!$AD$2:$AD$5028)*($B5=Sheet1!$H$2:$H$5028))+SUMPRODUCT(--($A5=Sheet1!$CC$2:$CC$5028)*(C$2=Sheet1!$AW$2:$AW$5028)*($B5=Sheet1!$H$2:$H$5028)))
$A5 will be over the range of $A5 to $A3716
$B5 will be over the range of $B5 to $B3716
C$2 will be over the range of C$2 to ES$2
and the result of this calculation will be placed in C5:ES3716
Thanks.