+ Reply to Thread
Results 1 to 7 of 7

Copy paste values on cell change in range

  1. #1
    Registered User
    Join Date
    09-08-2018
    Location
    Kamloops, Canada
    MS-Off Ver
    Office 365
    Posts
    86

    Copy paste values on cell change in range

    I have a range (F13:AC300) that contains formulas. If any one of these cells is overwritten (ie. user input), I want to copy paste a different range (D13#) over top of itself. I have the following code but it doesn't work when I change on of the cells in the range. What do I need to do?

    Please Login or Register  to view this content.
    I have entered this at the worksheet level. Later on, I will be recreating this setup on a separate sheet, and I will reapply this technique to the new sheet.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Copy paste values on cell change in range

    Place this macro in the worksheet code module.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,090

    Re: Copy paste values on cell change in range

    Doesn't that get triggered even if the overwritten value/formula is the same as the original - i.e. no change?

  4. #4
    Registered User
    Join Date
    09-08-2018
    Location
    Kamloops, Canada
    MS-Off Ver
    Office 365
    Posts
    86

    Re: Copy paste values on cell change in range

    Thanks, Mumps1. That worked with some minor changes. I did the following;

    Please Login or Register  to view this content.
    Question: how do I now stop the macro running? Basically once it runs once, I want to not have it run again. I did "On Error Resume Next" but then it kept moving the active cell to D13. I definitely don't want that. I want it to just do the default Excel action. For example, once it's run and now the copy/paste has occurred, and I say do 5->Enter in cell K9, I want it to move to K10. Or if I hit Tab from K9, I want it to move to L9.

    Thanks in advance.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Copy paste values on cell change in range

    Try:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-08-2018
    Location
    Kamloops, Canada
    MS-Off Ver
    Office 365
    Posts
    86

    Re: Copy paste values on cell change in range

    Worked perfectly. Thanks, Mumps1. One last thing; the first time I change one of the cells, it does the copy/paste but leaves like the picture below. How do I stop that?

    Attachment 736631

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,052

    Re: Copy paste values on cell change in range

    Your link doesn't work. See the yellow banner at the top of this page for instructions to attach a file.

+ 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. Macro to change cell for each value in range, copy and paste dynamic results
    By DFSGolfMetrics in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2015, 10:26 PM
  2. [SOLVED] Copy and Paste Range of Cells based on # of cell values in Column A
    By bwaite87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2014, 05:51 PM
  3. Replies: 1
    Last Post: 02-12-2014, 05:29 AM
  4. Replies: 4
    Last Post: 08-12-2013, 01:35 PM
  5. paste RNG numbers
    By kaohik78 in forum Excel General
    Replies: 0
    Last Post: 09-26-2012, 10:30 PM
  6. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM

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