+ Reply to Thread
Results 1 to 4 of 4

Increasing Processing Speed

  1. #1
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562

    Increasing Processing Speed

    I have a friend who has asked a question about how to improve the speed at which a program he has written is running. He basically has two tables; one is custom list of about 3000 customers and the other is an invoice list of about 12,000. The program he has created simply creates a past due list with various past due buckets an invoice can go into (30-60, 60-90, 90-120, etc). The program grabs a customer then looks through the list finding each invoice and then evaluates whether it is past due or not and what bucket it might fall into. Basicly, the program is looping through 12,000 records 3000 time and it takes it about 15 minutes to do it. Both lists are going to continue to grow.

    My friend is fairly new at VBA, but has picked it up quickly and definitely wants to learn. I have given him a few thoughts, but I do not deal with anything that is of that size so I thought I would soliciate the forum for some ideas on how some of you who do this for a living my tackle this problem. I'm not look for code at this point just general ideas and some directions to head. Obviously, looping through 12,000 records 3000 is a slow way of doing it.

    Any idea will certainly be appreciated. This will be a learning experience for me also and I am also certain I will find applications that I will want to use in some of my programs.

    Thanks in advance for you help!
    Sincerely,
    Jeff

  2. #2
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    You can make ur macros run lil bit fast by adding this code

    Application.ScreenUpdating = False

    However, there are number of other ways to achieve the result expected... including Vlookup...

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You could use a Custom Filter, start by recording a macro.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Another suggestion

    Sounds like you could add a lookup formula to do the calc and then fill down.

    e.g

    =IF(A1-TODAY()>0,LOOKUP(A1-TODAY(),{0,30,60,90},{"0","30-60","60-90","90-120"}),"")
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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