It seems that using code such as
Doesn’t turn off ALL calculations.![]()
Please Login or Register to view this content.
I have an application where I read in two tables from an external file, each into its own tab. If that’s all I did, the tables load in seconds.
I now add another table in a third tab. It refreshes data from a data source. in a matter of seconds.
Now I add two columns to the third tab. One does a VLOOKUP against the first table and the other does a VLOOKUP against the second table. In the next column I take the mathematical difference between these two columns and finally one more column to see if the result is zero.
As I said, to load the data without the formulas takes about 5 seconds. With the formulas loading the table takes about 13 minutes. I suspect that this is because the VLOOKUPS are being executed as the data are being loaded even though calculations are set to manual.
So I rewrote the code to remove the columns with the formulas, import the data and then add the columns back in with the formulas. This program takes about 5 seconds for the data to load and 2 minutes (plus or minus about 5 seconds) for the formulas to get calculated.
OK, so I have something that works, but do I have to go through all this trouble? Is there some other means that I am overlooking that will hold off execution of the VLOOKUPS until the data load is complete?
The data are proprietary so I can't post the program.
Here is the code howerver.
![]()
Please Login or Register to view this content.
Bookmarks