SirJB7
Excel Rōnin
Hi!
I've been using a book which has two sheets per month (one for buying, one for selling).
It accumulates info from Aug-2009, and it weights 30Mb, but I run it on a i7-920 with 6Gb, so it flyes.
It has several worksheets for summary and briefing, and I have no problem with them, the calculation is immediate.
But I recently added a new worksheet that retrieves information (just a dozen of columns) from each -just selling- sheets. In order to don't write many different formulaes in that sheet (among other issues as converting to constant values and so) I decided to write an UDF function, and as the workbook was an .xlsm with thousand of VBA code lines, I supposed that 20 more lines wouldn't affect the performance at all.
Wrong. This new worksheet has 800 rows and less than 20 columns, with 14 of then using this UDF, so... 800*14=1120 formulaes identical (they use first column and the first row as parameters, and four cells of the same row too, none of these with UDFs).
The problem? I can only view the result of the cells containing this UDF until I press CTRL-ALT-F9. The calculation method is set as automatically (including tables). I've tried adding Volatile, and nothing. Even more, if I'm working with this workbook -in any sheet-, and I switch to another workbook -even if they're not relationed with the first one-, when I come back to the original I lose all the values shown, and I have to press CTRL-ALT-F9 again... action that takes 1'40"...
The function code isn't complex, it looks in a table to which month corresponds each bill, with this month builds a string for the sheet's name, and does a vertical look up with the bill number (the first column parameter) and extracts the value corresponding to the header column (the first row parameter).
Thanks for your interest and help.
Regards for all!
I've been using a book which has two sheets per month (one for buying, one for selling).
It accumulates info from Aug-2009, and it weights 30Mb, but I run it on a i7-920 with 6Gb, so it flyes.
It has several worksheets for summary and briefing, and I have no problem with them, the calculation is immediate.
But I recently added a new worksheet that retrieves information (just a dozen of columns) from each -just selling- sheets. In order to don't write many different formulaes in that sheet (among other issues as converting to constant values and so) I decided to write an UDF function, and as the workbook was an .xlsm with thousand of VBA code lines, I supposed that 20 more lines wouldn't affect the performance at all.
Wrong. This new worksheet has 800 rows and less than 20 columns, with 14 of then using this UDF, so... 800*14=1120 formulaes identical (they use first column and the first row as parameters, and four cells of the same row too, none of these with UDFs).
The problem? I can only view the result of the cells containing this UDF until I press CTRL-ALT-F9. The calculation method is set as automatically (including tables). I've tried adding Volatile, and nothing. Even more, if I'm working with this workbook -in any sheet-, and I switch to another workbook -even if they're not relationed with the first one-, when I come back to the original I lose all the values shown, and I have to press CTRL-ALT-F9 again... action that takes 1'40"...
The function code isn't complex, it looks in a table to which month corresponds each bill, with this month builds a string for the sheet's name, and does a vertical look up with the bill number (the first column parameter) and extracts the value corresponding to the header column (the first row parameter).
Thanks for your interest and help.
Regards for all!