+ Reply to Thread
Results 1 to 6 of 6

How to automatically use input values and copy results to a different worksheet?

  1. #1
    Registered User
    Join Date
    03-15-2014
    Location
    Spain
    MS-Off Ver
    Excel 2013
    Posts
    3

    How to automatically use input values and copy results to a different worksheet?

    Hi,

    I’m quite new to creating macros, I basically only played with recorded macros.., and I’m lacking the skills to solve a problem I have. Hopefully someone can help with it.
    See the attached example worksheet to support my explanation.

    I have a lot of input combinations on sheet “Input values” that I need to enter in my formulas on sheet “Input & 1st results”.
    On the sheet “2nd results” I do some additional processing on the results of each input combination. Afterwards I need to special copy the values of these results to the sheet “All results”. The results of every input combination should be pasted into the next empty column.

    I recorded a simple macro which does this on a very basic level. I’m quite sure this can be done much more sophisticatedly by a macro using a loop, but I have no idea how to create such a macro.

    It would be really great if anyone could help me out. Thank you very much in advance!!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to automatically use input values and copy results to a different worksheet?

    Hi Mijnrath,

    try this:

    Please Login or Register  to view this content.
    Last edited by xladept; 03-15-2014 at 07:27 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    03-15-2014
    Location
    Spain
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: How to automatically use input values and copy results to a different worksheet?

    Hi xladept,

    Many thanks for your quick answer!

    Your macro has the same results as mine, only your code looks a lot better!

    Apparently I haven’t been clear enough about what I need exactly though, sorry about this. Let me clarify.

    On the sheet “All results” I need the results of all the 50 possible input combinations, all pasted in separate columns.
    Both with your as with mine macro this would mean a lot of copy/pasting and manually modifying the macro code.

    So what I would like to have is a macro that uses some kind of iteration loop to detect how many input combinations there are (in this case 50). The macro should calculate the result values for all of these 50 combinations and copy these values to 50 different columns.

    This is just an example sheet, in the Excel sheet I really need this for I have hundreds of possible input combinations..

    It’s getting late in Europe, so I’m going to bed..
    I hope I provided enough information this time and that you or someone else can help me out.
    Many thanks again, much appreciated!!

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to automatically use input values and copy results to a different worksheet?

    Try it now

  5. #5
    Registered User
    Join Date
    03-15-2014
    Location
    Spain
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: How to automatically use input values and copy results to a different worksheet?

    The macro runs now great xladept, many thanks!!

    The macro code is also simple enough to not get demotivated while figuring out how you actually do it

    Thanks you very much again, you really helped me out!

    Cheers

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to automatically use input values and copy results to a different worksheet?

    You're welcome and thanks for the rep!

+ 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. Automatically copy and save values on a 30-days Worksheet
    By emark in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2013, 12:06 PM
  2. [SOLVED] Automatically copy and paste (or update) cell values to another worksheet using VBA code
    By jjin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-21-2013, 04:56 AM
  3. 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
  4. Combining two macros ( user input & search/copy results)
    By newbe2009 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2009, 10:19 AM
  5. [SOLVED] automatically copy values of worksheet into new workbook
    By Jane in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-07-2005, 11:05 AM

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