+ Reply to Thread
Results 1 to 8 of 8

Simplify Loops in Code

  1. #1
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Simplify Loops in Code

    Hi,

    Below you'll find a small portion some Ron Debruin code that I use to append raw data.. I would like for this to be simplified if possible. The total code runs in about 4 to 5 minutes to complete. About 90 percent of the code looks like this:

    Please Login or Register  to view this content.
    Any help that you could provide would be greatly appreciated.

  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: Simplify Loops in Code

    How many rows of data do you have?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Re: Simplify Loops in Code

    Thanks for replying. It's usually anywhere from 30,000 to 100,000 depending the number of work items.

  4. #4
    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: Simplify Loops in Code

    I don't see anything intrinsically inefficient in the code, but there may be a more efficient way to achieve your result. Can you describe what you need this code to do with your data?

  5. #5
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Re: Simplify Loops in Code

    The code works just fine I was trying to make it more efficient if at all possible to reduce the time it takes. Thank you for looking into it.

  6. #6
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Re: Simplify Loops in Code

    I was wondering if maybe some non-looping method would be more efficient?

  7. #7
    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: Simplify Loops in Code

    Quote Originally Posted by MusicMan View Post
    The code works just fine I was trying to make it more efficient if at all possible to reduce the time it takes. Thank you for looking into it.
    One way to make it more efficient is to use a completely different method, but to do that I need to understand what you want it to do.

  8. #8
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Re: Simplify Loops in Code

    I group the data starting with 1.2. together to place in another column for analysis. Other pieces of information is also pulled from the raw data for other purposes. It all is combined in a report that is updated daily.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Simple VBA code to convert text to number (simplify/fix current code)
    By kenenthpaul0401 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-26-2018, 10:47 AM
  2. How to simplify my code
    By niuyuer in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 05-13-2016, 12:15 PM
  3. [SOLVED] Simplify code
    By KBSH in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2016, 03:20 PM
  4. Simplify Code to Reduce from 4 Loops to 1
    By Jim28 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-03-2012, 05:08 PM
  5. [SOLVED] How can I simplify this code?
    By etuckram in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-26-2012, 05:04 AM
  6. simplify code
    By double a enterprises in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-05-2010, 05:42 AM
  7. [SOLVED] Simplify Code
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2006, 01:59 PM

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