How would I add a loop for this?
For the first question, check out the VBA function called DIR, which
allows you to refer to a specific directory and run through all or just
a few of the files it finds there. For the second, you might enter a
line at the beginning of the code that sets calculation to manual, and
another line at the end of the code that sets calculation back to
automatic. This will speed prevent Excel from calculating everytime a
SUMPRODUCT formula is generated by your code.
|