I have a bunch of sumproduct and date formulas that were working fine before I added variables. My original code that worked:
Please Login or Register  to view this content.
and
Please Login or Register  to view this content.
worked fine.



Now it is:
Please Login or Register  to view this content.
and
Please Login or Register  to view this content.
and I'm getting the "Excel ran out of resources while attempting to calculate one or more formulas." error.

I defined the variables at the top of the script:
Please Login or Register  to view this content.
In total, I'm using these formulas with different variables 112 times. I'm guessing that either I did something wrong or that adding the tcfl variable to all those sumproducts is just too much. Any ideas on how to resolve this would be very much appreciated. Thanks!