+ Reply to Thread
Results 1 to 11 of 11

VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    5

    VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    Hi,

    I'm looking to automatically copy any cell value change from a particular cell to a dedicated column on separate sheet within the same workbook.

    In other words, anytime the value in cell A1 on Sheet1 is changed, I want the new value to be automatically copied in cell A1 on Sheet2; when the value in cell A1 on Sheet1 is changed again, then I want that new value to be automatically copied in cell A2 on Sheet2, and so on & so forth down the column.

    Thanks in advance for the help!

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    Hi,

    this will do the job.

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    09-04-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    Thanks for your reply, Xlbiznes. I've tried to use this code but it does not function the way that I intend it to. Can you please let me know how I can use this code to specifically reference the changes that occur in cell A1 on Sheet1 to be copied over to column A on Sheet2? Pardon my ignorance, but I'm not very experienced with VBA code so I need the exact code that will execute this request.

    Thanks again!

  4. #4
    Registered User
    Join Date
    05-28-2012
    Location
    Pittsburgh, Pa
    MS-Off Ver
    Excel 2003 - 2007 -2010
    Posts
    49

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    kev2177,

    I looked at your question.

    This book is done with Excel 2010.

    Open Book and enter values in Sheet 1, cell a1.

    Check values in Sheet 2.

    Let me know if it works for you.

    cplmckenzie
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    hi,

    if you just want the changes in a1 then code will change as follows :

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-04-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    cplmckenzie,

    Thanks for your reply. Your worksheet almost solved my issue; the only problem here is Sheet2 is copying down the cell contents from A1/Sheet1 if values are entered or changed in other cells on Sheet1. I only want Sheet2 to record cell changes exclusively from Cell A1 on Sheet1 (not changes from the other cells on Sheet1). If you want to get an idea of what I'm talking about, open up the sheet & input whatever number in A1/Sheet1, then type some numbers into random cells on Sheet1, and you will see that on Sheet2, the A1/Sheet1 contents are being copied down as a result of any cell changes on Sheet1. Can you please help me with this code?

    Thanks a lot!

  7. #7
    Registered User
    Join Date
    09-04-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    Hi Xlbiznes,

    Thanks for your reply! As I've responded to cplmckenzie below, this code still does not satisfy what I need the worksheet to do. cplmckenzie's worksheet almost does exactly what I need it to do, (and I've also tested your last code since it was more specific to Cell A1/Sheet1), however, I need Sheet2 to record a continuous list in (say, column A) of any value changes in A1/Sheet1. Can you please help with this code?

    Thank you!

  8. #8
    Registered User
    Join Date
    05-28-2012
    Location
    Pittsburgh, Pa
    MS-Off Ver
    Excel 2003 - 2007 -2010
    Posts
    49

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    Okay,

    So with a better understanding from what you said, let me ask you.

    There will be other values in other cells in Sheet1?

    Correct.

    cplmckenzie

  9. #9
    Registered User
    Join Date
    05-28-2012
    Location
    Pittsburgh, Pa
    MS-Off Ver
    Excel 2003 - 2007 -2010
    Posts
    49

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    kev2177,

    Try this updated book that is attached.

    Thanks to Xlbizines for his suggestion. Between the two pieces of code, it appears to work.

    cplmckenzie
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-04-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    5

    Talking Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    cplmckenzie & xlbiznes:

    THANK YOU so much for all of your assistance in helping me resolve my issue!!! The code works perfectly to what I was looking for. I really appreciate it. So grateful to have active forums like this to help each other out!

    All the best,

    Kev

  11. #11
    Registered User
    Join Date
    05-28-2012
    Location
    Pittsburgh, Pa
    MS-Off Ver
    Excel 2003 - 2007 -2010
    Posts
    49

    Re: VBA Code to Copy Cell Value to Another Sheet When Value Is Changed

    kev2177,

    If your issue has been resolved. Kindly.....

    Mark Your Thread Solved


    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

    cplmckenzie

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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