+ Reply to Thread
Results 1 to 4 of 4

Getting several codes to run at once and copying cells to another sheet

  1. #1
    Registered User
    Join Date
    01-11-2020
    Location
    Norway
    MS-Off Ver
    Microsoft Office 2019
    Posts
    23

    Getting several codes to run at once and copying cells to another sheet

    Hi,

    So, I posted a thread the other day regarding a problem of mine (which I am not allowed to post the link to because I am too new to the forum) .


    Basically I run an equation by changing a cell value on a different sheet, let's call that cell value for "D8" and the sheet for "Value sheet". I then have a cell at another sheet which is "C7" on what we can call "Equation sheet". on the "C7" cell I have used the simple command "='Value sheet'!D8" to get the value from the cell that I change the value on.
    I then run the following script to solve the equation (the goalseek function):

    _______________

    Please Login or Register  to view this content.
    ________
    NOTE: This code is at the "Equation sheet"

    So, I now want to have another sheet that we can call "Solution sheet" where I basically want to have several columns with empty values with one exception which would be a column with a dropdown box where I can select between 14 values or so.
    I then want about twenty rows where I can change one column from the dropdown box described above, which by it self is no trouble making.
    So, by changing a value in one of the rows in the "Solution sheet" I want the value that I change to transfer to the "Value sheet", which again will run the program.

    To solve this I got the following tip the other day:

    _______________________
    Please Login or Register  to view this content.
    ____________________________

    I have not tried it yet, but I am wondering on which sheet this one should by pasted? I guess it has to be the "Solution Sheet" since it has no reference to another sheet.

    So, let's say that I made it so far. Now when the code runs and solve the equation for the selected variable, I want it to immediately copy 6 values that we get from the equation into the "Solution sheet". But I need the values to be copied to the same row that I changed the value, and after they are copied I want them to stay there until I change something on the same row again.

    I want that for all the 20 rows.

    I have tried so much by myself but sometimes it feels like I am shooting in the dark Any help is highly appreciated!

    Please feel free to comment if anything is not clear.
    Last edited by Pepe Le Mokko; 01-16-2020 at 03:25 AM. Reason: Added tags

  2. #2
    Forum Guru Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux
    Posts
    10,952

    Re: Getting several codes to run at once and copying cells to another sheet

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

  3. #3
    Forum Guru Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux
    Posts
    10,952

    Re: Getting several codes to run at once and copying cells to another sheet

    Administrative note
    Please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version. Your profile does not indicate your version.
    Thanks

  4. #4
    Registered User
    Join Date
    01-11-2020
    Location
    Norway
    MS-Off Ver
    Microsoft Office 2019
    Posts
    23

    Re: Getting several codes to run at once and copying cells to another sheet

    Thank you! I have now updated

+ 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. Replies: 4
    Last Post: 05-12-2017, 09:24 AM
  2. [SOLVED] How to CONCATENATE when copying cells from source sheet into target sheet
    By Murman01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2016, 01:51 PM
  3. Replies: 1
    Last Post: 12-15-2015, 05:04 PM
  4. Replies: 1
    Last Post: 12-10-2013, 12:28 AM
  5. Help linking data sheet to another worksheet. Using codes to update cells
    By Scarlett-83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-17-2013, 05:30 AM
  6. VBA codes for copying certain cells from many workbooks
    By samirelsabagh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2013, 08:55 PM
  7. Replies: 3
    Last Post: 04-26-2012, 05:15 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