+ Reply to Thread
Results 1 to 5 of 5

Loop Do Until Reach a maximum value

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    Stockholm
    MS-Off Ver
    Excel 2007
    Posts
    93

    Loop Do Until Reach a maximum value

    Hi everyone,

    This is the code I am working with:

    Please Login or Register  to view this content.
    What I want to achieve is the following: I set some starting values for variables B16:C17. In the code above, these starting values are fixed, but I want to randomize them from 10 to say 200 in steps of 10. This is something that I can do. More importantly, for all these different starting values I want to get the maximum value from Solver for cell (31,3), i.e I need the loop to work not until Worksheets("Sheet2").Cells(31, 3) > 288, but when Cell (31,3) is maximized together with the other constraint: Worksheets("Sheet2").Cells(40, 3) = 0.

    Thank you very much for your suggestions in advance!

  2. #2
    Registered User
    Join Date
    04-28-2013
    Location
    Stockholm
    MS-Off Ver
    Excel 2007
    Posts
    93

    Re: Loop Do Until Reach a maximum value

    And this is the worksheet I am working with.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-28-2013
    Location
    Stockholm
    MS-Off Ver
    Excel 2007
    Posts
    93

    Re: Loop Do Until Reach a maximum value

    The Excel Worksheet
    Attached Files Attached Files

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Loop Do Until Reach a maximum value

    Multiple postings on the same subject is considered bad manners as it wastes time and effort for those who try to help you.

    http://www.excelforum.com/excel-prog...epeatedly.html

    http://www.excelforum.com/excel-prog...uilibrium.html

    Alf

  5. #5
    Registered User
    Join Date
    04-28-2013
    Location
    Stockholm
    MS-Off Ver
    Excel 2007
    Posts
    93

    Re: Loop Do Until Reach a maximum value

    I do sincerely apologize if my behaviour does not comply to the gentlemanly code of conduct on this webiste!

+ 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. Maximum value within a 10 minutes timeframe (conditional maximum)
    By Jimmy T in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-15-2011, 09:58 AM
  2. Replies: 4
    Last Post: 03-25-2009, 10:12 AM
  3. reach previous value in a loop
    By 77anders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2009, 02:50 AM
  4. Advanced Loop in macro find maximum value
    By 77anders in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-05-2009, 03:18 PM
  5. [SOLVED] loop macros until reach blank in adjacent column
    By McKCollins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2006, 06:10 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