Hi there,
We have a fairly complicated macro in Excel which we have used in our system for a number of years. In the most part it works fairly well, but there is a certain situation where it is much slower than i would like. I am wondering if anyone has any suggestions as to how i might improve performance a bit.
I have attached a sample csv output and an example of what it looks like after the macro has done it's stuff.
The methodology the macro uses at the moment is to import the data into a temporary worksheet and then move through, row at a time, using a rather large select statement to do what it needs to, based on the code in the first column.
What really seems to slow things down is when it is applying colour and border styles to the cells. These are applied based on the rows starting CL and LI and at the moment are processed cell at a time.
I did get a long way into putting something together that would do a sum on the CL and CT lines, store it in an array along with the address of the cell and then copy and paste the formatting when it found a row with a similar sum. Unfortunately i never managed to get this working entirely successfully as it would copy lines that weren't required.
I have turned off things like screen updating and auto calc.
If anyone has any thoughts on ways i might be able to improve things i would be really pleased to hear them!
uksrogers