+ Reply to Thread
Results 1 to 4 of 4

Excel simulation help (Auto copy and paste)

  1. #1
    Registered User
    Join Date
    06-08-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2013
    Posts
    9

    Excel simulation help (Auto copy and paste)

    I have a complex simulation that displays different values on cell A1 upon editing any cell. I want to create a histogram for these data but instead of manually copying and pasting hundreds of times, is there anything I can do to make excel copy and paste the value on cell A2,A3,A4....etc each time the spreadsheet is edited?

    Thanks in advance!

    PS: In case I wasn't clear, the picture below should explain everything:

    https://s32.postimg.org/cme49w2xh/image.png

    In the case above, I could simply drag the values to the right but I cannot do that in my original simulation since it is too complex.
    Attached Images Attached Images
    Last edited by beamthegreat; 07-05-2016 at 10:56 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,242

    Re: Excel simulation help (Auto copy and paste)

    Hi beamer,

    "Each time the sheet is edited" implies you need an EVENT macro that lives behind the worksheet. The event is "On_Change" and will trigger whenever something on that worksheet is changed. Then you need to find the LastRow in Column A and put something in it. I guess showing you is easier than telling you. See the attached with this code.

    Please Login or Register  to view this content.
    Log any sheet change in Col A.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    06-08-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Excel simulation help (Auto copy and paste)

    Quote Originally Posted by MarvinP View Post
    Hi beamer,

    "Each time the sheet is edited" implies you need an EVENT macro that lives behind the worksheet. The event is "On_Change" and will trigger whenever something on that worksheet is changed. Then you need to find the LastRow in Column A and put something in it. I guess showing you is easier than telling you. See the attached with this code.

    Please Login or Register  to view this content.
    Attachment 469034
    Thank you for your quick response! Unfortunately, I do not know how to code in excel. Could you please send me the code and tell me where I should paste it?

  4. #4
    Registered User
    Join Date
    06-08-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Excel simulation help (Auto copy and paste)

    Nevermind! I changed the Now() part to Range("A1") and got it working! Thank you so much.

+ 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: 6
    Last Post: 10-04-2015, 10:46 AM
  2. auto copy paste 1 by 1
    By ash3angel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2015, 12:27 PM
  3. VBA auto copy-paste from Excel to Word works but no source formatting!
    By hotsince82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2015, 12:46 PM
  4. Optimising / Simulation / Auto charting
    By gloopy in forum Excel General
    Replies: 1
    Last Post: 05-21-2015, 05:35 AM
  5. [SOLVED] Auto copy/paste?
    By ads2k12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2012, 05:19 PM
  6. Auto copy & paste
    By clinet in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-25-2011, 09:32 AM
  7. Replies: 1
    Last Post: 09-22-2010, 11:00 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