+ Reply to Thread
Results 1 to 4 of 4

Loops within loops looping

  1. #1
    Registered User
    Join Date
    10-31-2014
    Location
    Memphis, TN
    MS-Off Ver
    2013
    Posts
    16

    Loops within loops looping

    I run service calls on customer equipment.

    I have a DB of all the equipment (address, unit #, serial, config, etc.). It also has an area to accumulate call data (date, call number, unit serviced, travel and work start/stop times).

    I have an autorun main menu, where I can AED (Add, Edit, Delete) either machine information and call data. It does a lot more too.

    I enter the call data at the end of the week, so I am doing 20-30 calls. When I exit out of entering the call data, it can take up to five minutes for Excel to catch up and show the updated metrics as it completes all the loops and calls I have accumulated.

    Is there a way to run functions multiple times without accumulating such a backlog?

    Is there a setting so that the autorun activates at the exit of any function?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Loops within loops looping

    Without seeing your code, it is difficult to analyze what is happening. A suggestion though (flying blind), is to turn off automatic calculation until after the loops complete.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

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

    Re: Loops within loops looping

    Hi MemphisMark,

    If you are using VBA to do your loops (you don't say that in the question) you can control what gets calculated.

    You would have Calculate set to manual and then in your code you would specify a Range and then tell VBA to calculate that range only. This might be what you are searching for. It is very hard to understand what you have from your question. See:

    https://msdn.microsoft.com/en-us/lib.../ff834613.aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    10-31-2014
    Location
    Memphis, TN
    MS-Off Ver
    2013
    Posts
    16

    Re: Loops within loops looping

    Let me explain it this way:

    Autorun (form and code) -> Add call data -> Display call data for week -> Add call data -> Display call data for week -> Add call data -> Display call data for week ->
    Add call data -> Display call data for week -> Add call data -> Display call data for week -> Add call data -> Display call data for week ->
    Add call data -> Display call data for week -> Add call data -> Display call data for week -> Add call data -> Display call data for week ->
    Add call data -> Display call data for week -> Add call data -> Display call data for week -> End data entry.

    I have a sheet that shows data by week based on aggregate call data. This does not change until all these loops are undone.

    I can't turn off calculation, because formulas have to interpret what I save to the spreadsheet, use indirect addressing based on that data for where to save it, then calculate and sort based on the data on the fly.

+ 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] Help with Loops
    By omagoodness in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2016, 06:27 PM
  2. [SOLVED] Help with do until loops.
    By etuckram in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-28-2013, 08:15 AM
  3. Looping Macro Issue - Infinate Loops
    By frodo987 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2012, 03:39 AM
  4. Using Loops
    By Greg1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2007, 04:29 AM
  5. [SOLVED] loops
    By Capp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2005, 03:05 PM
  6. [SOLVED] Using For - Next Loops in VB
    By Biomed in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-22-2005, 04:06 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