The .Text Property Causes Code to Execute Slower and Slower

I've recently found out that using the .Text property to get the text of a cell when looping through records causes the code to get progressively slower and slower until it's almost crawling, whereas getting just the cell's value doesn't exhibit any performance problems. What's the cause of this?

Example: I have 20,000 records, looping through them, getting the .Text property of a cell in column A, doing some processing with it. First 10,000 records go pretty quickly, then it starts slowing down more and more until, by the end, it's going at about 100 records/second as apposed to 1000 records/second. Simply removing the .Text property makes it fast all the way through. So what's the memory leak or whatever it is with the Text property?
 

Question Info


Last updated February 27, 2018 Views 601 Applies to:
Answer
Answer
I have posted an analysis and comparison of .Text .Value and .Value2 at
http://fastexcel.wordpress.com/2011/11/30/text-vs-value-vs-value2-slow-text-and-how-to-avoid-it/

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.