+ Reply to Thread
Results 1 to 4 of 4

Copy and Paste Input, then iterate, copy and paste results, and then perform next scenario

  1. #1
    Registered User
    Join Date
    12-31-2014
    Location
    Seville, Spain
    MS-Off Ver
    Excel 2010
    Posts
    3

    Copy and Paste Input, then iterate, copy and paste results, and then perform next scenario

    Hi All,

    I just joined this forums in hope of finding some help with a problem that i have encountered in performing some sensitivities in a financial model. I have basic familiarity with VBA so please be patient. I need to design a macro that allows me to copy a variable from a sheet and paste it into an inputs sheet and then take the output that results from that input and paste that into the cell next to the input in the original sheet.

    The difficulty that I see is that I don't know how to actively move the cell that it copies the input from and pastes the output to for each scenario

    I need to run this scenario several hundred times so rather than waste 12 hours of my life I figured I would invest some time in learning some basic VBA. Any help would be much appreciated.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Copy and Paste Input, then iterate, copy and paste results, and then perform next scen

    Hello,

    what's your code so far? What is the structure of your workbook? Can you post a sample file with some dummy data?

    What is your Excel version? "microsoft 7" is not good enough. Microsoft is a company. They have many products and these products have many versions. Excel is one of their products, so is Windows. You may be running Windows 7, or XP, or 8.1. You may be running Excel 2007, or 97 or 2013. Please be specific. Details matter.

  3. #3
    Registered User
    Join Date
    12-31-2014
    Location
    Seville, Spain
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Copy and Paste Input, then iterate, copy and paste results, and then perform next scen

    Thanks for the quick response Teylyn. I appreciate you taking the time to answer me. I am using microsoft excel 2010. I don't have the code yet. First, I wanted to get an idea as to how I can conceptually approach the problem. I have a financial model for a solar project. I want to see how changing one variable affects the internal rate of return of the project. I have a sensitivities sheet which has roughly 300 different values for this particular variable. For each value of the variable I want to be able to paste it into an inputs sheet. Once I paste it to the inputs sheet, this will affect my cash flow, which will change my internal rate of return. I would therefore like to then grab the internal rate of return that results from me inputing the value of the variable and then copy that onto my sensitivity sheet next to that particular value of the variable. I think I know how to perform a loop to run multiple iterations. What I do not know is how to move the cell down one row to grab the next the value of the variable. Similarly, how can I grab the output and paste it next to that particular value of the variable so that as i go through the scenarios it populates the output for each particular scenario.

    I have created a dummy sheet which I think simplifies my problem. I would like to copy the values in D8:D27 in the Scenario Sheet, paste those to E8 in the Input and Output Sheet, and then take the output and paste that to row E in the scenario sheet for each particular value of the variable. Any solution would be much appreciated.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-31-2014
    Location
    Seville, Spain
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Copy and Paste Input, then iterate, copy and paste results, and then perform next scen

    Bumping this thread. If anyone can please provide some help with this I would greatly appreciate it. Thanks in advance and Happy New Year.

+ 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. [SOLVED] Copy Named Range on Different Sheet and Perform Paste Special on ActiveSheet
    By ScottyBee in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-08-2013, 06:34 PM
  2. Excel Macro help to copy/paste results using input values from a list box
    By kamila7 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2012, 04:46 PM
  3. Excel Macro to perform copy and paste and Loop
    By cyrus-gbs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2011, 02:09 PM
  4. Comparing two sheets and perform copy paste operation
    By kmlprtsngh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2010, 04:56 AM
  5. Perform copy and paste based on cell value's
    By KevinThomas in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-19-2010, 01:12 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