+ Reply to Thread
Results 1 to 2 of 2

Creating macro to run a model multiple times with different input variables by row

  1. #1
    Registered User
    Join Date
    06-09-2017
    Location
    San Francisco, USA
    MS-Off Ver
    2016
    Posts
    1

    Creating macro to run a model multiple times with different input variables by row

    I have 4 columns of data: Date, price, vix/change, discount rate of 8000+ lines
    I made an input table that is linked to the variables in each associated cell of the column by row and feed it into a model (separate sheet).
    The model outputs a price that is returned to the original sheet.

    Current set up
    Data->input box (linked to data)->Model (linked to input box) -> return price /// Issue: rerun model on next line to nth row/end with data from following row
    Goal: set a date that then inputs the associated data in the row into the model and then returns price and moves onto the next row until completed.


    Could I please get some assistance to make this happen?

    Thanks

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 2003, 2010, 2016 (Windows)
    Posts
    4,853

    Re: Creating macro to run a model multiple times with different input variables by row

    Set up your model to use INDEX functions all linked to one cell, like

    =INDEX(Data!A:A,$A$1)

    and the same for B, C, and D.

    Then use a macro to change the value of A1, re-calculate with the values from Data, and store the calculated value into the row with the input values, like

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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. model allocation where % allocated depends on multiple variables
    By Drudnits1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2015, 10:38 PM
  2. Creating a Scatter Plot with Multiple Series to Model a Complex Task
    By erichelal in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-10-2015, 05:57 PM
  3. Replies: 0
    Last Post: 03-25-2014, 03:04 AM
  4. Creating a Macro That will Run Solver Multiple Times
    By Otaishtf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2013, 10:28 AM
  5. [SOLVED] Input box to run a macro multiple times
    By bcas77 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-17-2013, 02:15 PM
  6. How to run a model in excel multiple times
    By lindep in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-30-2013, 07:50 AM
  7. Replies: 0
    Last Post: 03-26-2013, 04:13 PM

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