+ Reply to Thread
Results 1 to 2 of 2

VBA Solver copy and paste solution for different cells

  1. #1
    Forum Contributor
    Join Date
    02-13-2013
    Location
    Columbia, SC
    MS-Off Ver
    Excel 2010
    Posts
    217

    VBA Solver copy and paste solution for different cells

    I have what I think is a simple problem.

    In cell B2 I have a number. I allow this number to change to maximize the solution in AC3. I then want to paste this optimized value from B2 into C3.

    Then I want to rerun the program. I want B2 to change again, but this time I want to maximize the solution in AC3 and paste the solution into C3. How can I do this for all the way up to AC32 and pasting the solution from each optimization into its correspond cell in column 3?

    If I run solver and record the macro, I get this:

    Please Login or Register  to view this content.
    So I want this to loop from Ac3 to Ac32

  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,659

    Re: VBA Solver copy and paste solution for different cells

    Something like this perhaps (untested) ?

    Please Login or Register  to view this content.
    Not sure about your B2 value it stays the same during the loop? I would have thought it should change as well i.e. ("B" & i).

    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. Require Index Copy Paste Value Solution
    By VisionSmart in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-25-2019, 03:27 AM
  2. [SOLVED] Extremely slow copy paste (cause known, solution not)
    By amros in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-12-2017, 09:01 AM
  3. [SOLVED] Weekly Schedule, copy paste 52 times or other solution?
    By DMY852 in forum Excel General
    Replies: 9
    Last Post: 05-01-2017, 09:54 AM
  4. Replies: 3
    Last Post: 03-31-2017, 02:43 PM
  5. [SOLVED] Solution to copy a range of cells and paste in another Worbook w/o using an input box
    By kwesmc1 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-29-2017, 06:41 PM
  6. Replies: 11
    Last Post: 10-30-2013, 02:11 PM
  7. Copy and Paste solution needed
    By Nickvii7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-24-2013, 09:47 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