Excel (2010) macros really slow in Win 7

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
At work we recently upgraded to win7 and Excel 2010. (were on XP /2003). i have a ton of VBA macro in excel that i use on a near daily basis that all work fine in the new version of excel (we had to fix a few minor issues) but a few of them are extremely slow. they both take data from a CSV file, import/convert/copy paste/sorting, make some graphs and spit out a report.

in xp/excel 2003 it took ~45 seconds (on my crappy work PC) to process a single file. in Win7/2010 it takes 6 minutes. Same files same computer, and i can’t figure out why its taking so damn long.

If i run the same exact macro in excel 2010 on a win XP comp it takes ~45 seconds but running it on win 7 seems to be the issue.
is there any way to fix this issue that does not involve rewriting the macros to put everything into more arrays and simply stop using excel to sort/copy/paste? id rather not do that if it could be avoided.

The data sets from the CSV are generally 30 or so columns of data that have 10000 or so rows worth of data if that matters. We have tested it on multiple computers and the issue repeats
Excel 2003 on win vista and 7 don’t show the issue either; it seems to just be the 2010+7 combo
 
Last edited:

Zxian

Senior member
May 26, 2011
579
0
0
Are you running 64-bit Office on your Windows7 machine? There are certain operations that will allow more memory space in 64-bit Excel, but will be slower than the same operation under 32-bit.
 

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
you know i dont know that, i know we are running win 7 32 bit i dont know about office but if i had to guess its also 32 bit - i do have access to a win 7 64 bit comp, ill see if that changes anything tomorrow

however seeing as the macros were created under 32 bit 2003 and XP im not sure why this would just now be an issue
 
Last edited:

Zxian

Senior member
May 26, 2011
579
0
0
Office 2010 64-bit would require a 64-bit operating system to run. If Windows is 32-bit, then it means that Office is 32-bit.

Do you have any methods in the macro that call on an entire row or column? Excel 2007 and onwards use the Big Grid, so you're potentially looking over 16384 columns instead of 256 and 1 million rows instead of 65536. I'm not sure about the operations of Excel 2007/2010 on XP, but they might have a similar limitation or implementation in the underlying VBA.
 

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
most stuff is coded to only look at a specific area. cols A-AS rows 1-15k or something something like that so it should not be parsing the entire sheet but i guess it could be doing that ill have to go in and look