Results 1 to 10 of 10

Need Macro to repeat Solver for several scenarios

Threaded View

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    6

    Need Macro to repeat Solver for several scenarios

    Hello there-

    As the title explains, I am trying to come up with a macro that will run solver for me multple times across several columns. As you can see in the attachment, I am running solver for 99 different portfolio possibilities. I have solved for Column B, C and D by running solver repeatedly by hand but would like to make this process automated since I'll need to do this 100+ times for just this spreadsheet (many more!). Everything in here is fake so if some formulae doesn't seem all that logical, it's ok - just a test sheet!

    Starting in column C, going to CW, I am running solver as such:

    Set Objective: $D$23
    By Changing Variable Cells: $D$17:$D$19
    Subject to the Contraints:
    $D$17:$D$19 >=0
    $D$20 = 1
    $D$22 = $D$21

    Can anyone help with the VBA to make solver re-run itself from columns C all the way to CW - effectively changing the portfolio weights in rows 17-79 for each column? Unfortunately I'm new to the VBA arena. Much appreciated!

    CharlotteFI
    Attached Files Attached Files
    Last edited by CharlotteFI; 04-19-2013 at 04:23 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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