Hello,
I'm working on a Excel file with a table (116 cols, +/-2500 rows) with automatic formulas in hidden program colums.
The calculation works smooth when changing or adding data and when filtering or adding rows.
But, once tablerows are deleted (manually or with a macro), the calcutions suddenly get and remain slow.
The time to delete the rows is not the issue. The problem is that all further operations become very slow (several seconds for simple input).
The problems only occurs after deleting tablerows, not after inserting rows. But once the calculation has slown down, it remains slow even when inserting rows.
When saving/closing the slow file and reopening it, it surprisingly just works smooth again !
This makes me believe that the structure and formulas actually are ok.
I can't find any explanation/reason for this.
The formulas don't show any errors.
I followed the standard rules and advises:
- avoiding volatile functions
- all data and formulas on same sheet
- disabling calculation, screenupdating, ... in the beginning of the macro's (and resseting at the end)
- even disabling all filters and hidden rows/columns in the beginning of the macro
I tried different methods in VBA:
- Tbl.Listrows(i).Delete
- Selection.Entirerow.Delete
- Intersect(Selection.Entirerow, Tbl.DatabodyRange).Rows.Delete
These macros all work but result in slow calculation afterwards.
Using similar programming in the macros to insert rows, does not slow down calculation !
Does anybody know this issue ? Is there a solution ?
Bookmarks