Closed Thread
Results 1 to 2 of 2

General help simplifying my super slow VB code PLEASE :-D

  1. #1
    Registered User
    Join Date
    05-29-2013
    Location
    Brighton, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    General help simplifying my super slow VB code PLEASE :-D

    Apologies but I realised I posted this in general excel section and not the VB/macro section so this is a duplicate...but please help me

    Hi all, i'm a self taught fan of excel & vb but i'm still very much a novice when it comes to using some of the more advanced functions and my main problem at the moment seems to be that my code always ends up being very long winded and could very likely be simplified by quite some degree. This is probably as I still don't quite know what i'm doing :-S. I find that i'm often compelled to using select and activate functions which i'm aware is bad practice and can considerably slows things down.

    I've created a macro that basically searches a relatively large number of worksheets (approx 50) for a user defined unique number and then replaces another value (the price) in the same row as the unique number. This can be repeated up to 8 times depending on how many unique numbers are being searched for! HOWEVER...this is taking a HUGE amount of time to complete. Between 30 seconds for 1 unique number search and 200 seconds for all 8. Although this means not having to scroll through sheets and sheets to locate these individually it still takes about the same amount of time which defeats the object.

    I'd like to see firstly if somebody could please please please help me simplify the code which might speed things up and secondly if anyone could explain to me why when I hit the Escape key while the macro is running it completes the function in super lightning fast time (we're talking about a second) instead of the usual 30-200 second delay?! I just don't understand :-(

    My code:
    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: General help simplifying my super slow VB code PLEASE :-D

    Please do not create duplicate threads if you post to the wrong forum. Click the "report post" icon and request us to move it for you.

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. General help simplifying my super slow VB code PLEASE :-D
    By blackcat_78uk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-30-2015, 05:22 PM
  2. Can anyone help with simplifying this super long Excel IF statement?
    By YPerez in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-21-2013, 05:35 PM
  3. 2003 code runs super slow in 2010
    By emanresu65 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-04-2013, 05:25 PM
  4. Tons of Arrays = Super Slow Calculating
    By danmarsh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2012, 01:52 PM
  5. speeding up code that is super slow
    By cabinetguy in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 05-19-2011, 12:24 PM

Tags for this Thread

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