+ Reply to Thread
Results 1 to 5 of 5

Excel Macro using only 1 cpu and is painfull slow

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    CT
    MS-Off Ver
    Excel 2007
    Posts
    2

    Excel Macro using only 1 cpu and is painfull slow

    Howdy all.

    I have an excel 2007 spreadsheet with a macro that imports data from an access database. Normally when it runs you see "using 4 cpus" on the bottom but lately it has been going painfully slow and only using a single cpu core. What normally took 30 seconds or so to run now take 10 minutes and I want to pull my hair out. Any suggestions? Many thanks.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Excel Macro using only 1 cpu and is painfull slow

    Hi Uberwilhelm and welcome to the forum,

    To make VBA run faster there is the best read:
    http://www.cpearson.com/excel/optimize.htm

    Hope this helps.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    09-13-2012
    Location
    CT
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Excel Macro using only 1 cpu and is painfull slow

    Thanks for the reply Marvin.

    I went through the suggestions but I don't quite understand how those tips would effect the CPU usage. Oddly enough, the macro just decided to start using all 4 CPUs again this morning. Makes no sense.

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Excel Macro using only 1 cpu and is painfull slow

    I could be a problem with your code. Maybe post a workbook and see if the code can be made more efficient?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel Macro using only 1 cpu and is painfull slow

    vba is single threaded and will only ever use 1 cpu but there is an option to turn multithreaded calculation on or off. mtc will use multiple cores when it can.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1