+ Reply to Thread
Results 1 to 2 of 2

VBA Loop for Solver

  1. #1
    Registered User
    Join Date
    06-04-2021
    Location
    England
    MS-Off Ver
    17
    Posts
    2

    Exclamation VBA Loop for Solver

    Dear All,

    I am not an expert of VBA at all, therefore, I'll try to be as clear as I can.

    I am trying to create a code to automatically run a Solver across several columns. I managed to create a basic code that does the job, but that means that I have to copy and paste the code for all the rows I need it, and they are about 500.
    I was wondering if you could kindly help me to make a code that loops through all the columns at regular intervals.

    Here is a sample of what I need (without loop):

    Please Login or Register  to view this content.
    Could you be so kind to adjust it to make it loop until no columns are found?

    Kind regards,

    Simone

  2. #2
    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: VBA Loop for Solver

    You could try something like this

    Please Login or Register  to view this content.
    This macro will loop from E column to G column to I column as I assume you run solver on every second column starting at the E column.

    To find the last column with value perhaps check row 411 and replace 9 in macro above with:

    Please Login or Register  to view this content.
    Alf

+ 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. Replies: 2
    Last Post: 06-22-2020, 03:14 PM
  2. Solver VBA loop
    By bamseb in forum Excel General
    Replies: 3
    Last Post: 02-19-2019, 05:16 PM
  3. VBA to loop solver
    By debbiezwi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-21-2018, 12:34 PM
  4. Solver VBA Loop
    By excelnoobie164 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-13-2014, 12:15 PM
  5. Loop Solver with VBA
    By cloudwalking in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-20-2014, 03:04 PM
  6. [SOLVED] How to loop the solver in the VBA?
    By nchinas in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-01-2014, 06:34 PM
  7. Solver + Loop
    By k21k in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-22-2008, 10:00 AM

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