Forum Discussion
PPLepew
Aug 07, 2022Copper Contributor
Sort(a:a) changes my 120 spreadsheet size to 1M+ filled with zeroes
It's filled with zeroes???
Patrick2788
Aug 07, 2022Silver Contributor
Essentially, SORT is performing an EXPAND (albeit, involuntarily). It's interesting because Excel can perform this operation quickly. According to this guide, SORT uses approximate matching, so it makes sense.
https://docs.microsoft.com/en-us/office/vba/excel/concepts/excel-performance/excel-tips-for-optimizing-performance-obstructions#speed-up-lookups
https://docs.microsoft.com/en-us/office/vba/excel/concepts/excel-performance/excel-tips-for-optimizing-performance-obstructions#speed-up-lookups
PPLepew
Aug 07, 2022Copper Contributor
Thanks Patrick. I added some logic to figure out the max size of my sort.