Introduction: I have a spreadsheet that is populated every daily based on the values of another worksheet. Currently the cells are being populated using a SUMPRODUCT formula. This is a piece of a larger process in which I intend to automate using VBA.
Formula example:
=SUMPRODUCT(((TEXT(crstage!$W$3:$W$23625,"###")=TEXT(credits!$A4,"###"))*(crstage!$X$3:$X$23625)*(TEXT(B$3,"yymmdd")=LEFT(crstage!$F$3:$F$23625,6))))
Problem: The processing time for the SUMPRODUCT formula is too long for my current needs. The numbers for previous days are subject to change therefore I have to keep the SUMPRODUCT formula in every applicable cell.
Worksheets: I have two worksheets, "credits" and "crstage". I have provided mock versions of the credit and crstage worksheets. The worksheets are significantly larger.
Credits: Total Daily credits for a given day. This worksheet is overwritten every day with a new set of data. This new set of data can change the amounts of the previous day.
crstage: A running total of credits.
Question: Utilizing VBA how can I avoid lengthy processing time?