+ Reply to Thread
Results 1 to 6 of 6

How to code excel to have cell change color when data is edited

  1. #1
    Registered User
    Join Date
    05-12-2016
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    4

    Smile How to code excel to have cell change color when data is edited

    I am about to start a database audit where I will give each of our staff members excel exports of our database data. They will then go through the spreadsheets and make any necessary changes to the data, and I will then upload the changes back into the database. What I need is to be able to easily identify and isolate the cells that our staff changes so that I can upload the changes. While excel "track changes" is great, it doesn't appear to be sortable/filterable so that I could easily identify and isolate the changes for upload. I was hoping for a way to have the cell actually change color, or at least have the text of the cell change color, when a change was made so that I could sort based on color. I found this older thread which appeared very hopeful: http://www.excelforum.com/l/738980-asdf.html

    I'm excited to try this posted solution but when I right-click the sheet tab, and click viewcode the window that pops up doesn't seem to have a place I can copy the code. I'm pretty unsophisticated when it comes to excel, but know enough to get myself in trouble. I'm using Office 2013. Not sure if that makes a difference. Any help would be appreciated. (Hopefully) attached is the screenshot of the "viewcode" screen I get.

    Also, if anyone knows of a better solution to my overall goal of tracking and identifying changes (meaning I could filter them out) in a huge amount of data I'm all ears. Thank you so much!

    Excel Viewcode.JPG

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to code excel to have cell change color when data is edited

    Hi joyfulnoise55,

    To paste a worksheet change event, bring up the vba editor (alt-F11), and then on the left near the top you should have a VBA Project window. If VBAProject is not expanded, click the +, "microsoft excel objects" should be listed, and if that is expanded, then you see the sheets as well as "ThisWorkbook". Double click the sheet that you want the code to work for, and paste your code.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    05-12-2016
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: How to code excel to have cell change color when data is edited

    Thank you for the quick response! Unfortunately, when I click the "VBAProject (Audit Projects.xlsx)" project in the VBAProject window I just get an error message that says "Project is unviewable".

    Could it have anything to do with the fact that my workbook is saved on our company server? I wouldn't think so, but I guess you never know!

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to code excel to have cell change color when data is edited

    It shouldn't be... Is it a shared workbook? that locks the code area as far as I know.... if it is shared, unshare it temporarily?
    if it isn't shared, you may try sharing, then un-sharing the workbook to see if that unlocks it.

  5. #5
    Registered User
    Join Date
    05-12-2016
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: How to code excel to have cell change color when data is edited

    Oh how exciting! My workbook WAS shared because I had turned on the track changes feature earlier when I was playing with it. I unshared it and added that code, and it works like a charm THANK YOU for your help!!

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to code excel to have cell change color when data is edited

    Perfect
    If this solved the issue then please mark the thread as closed when you get a chance?

+ 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. Color highlight on change (Edited) cells
    By hiteshkumar21483 in forum Excel General
    Replies: 3
    Last Post: 08-12-2014, 02:52 AM
  2. [SOLVED] Change cell color depending on cell color, error in code
    By mushedpotatos in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2014, 04:20 AM
  3. [SOLVED] vba code to change the cell color by looking in a range that contains the color index valu
    By ckklconner in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-24-2013, 09:15 AM
  4. Code to Change Tab Color if Data Exists
    By jscalem in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-07-2013, 08:57 AM
  5. Change Excel (2010) Row color per the value in the row-cell using VBA code
    By sandyusa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-19-2012, 09:16 AM
  6. change cell color based on last edited date
    By pubudu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2011, 02:11 AM
  7. [SOLVED] How do I change fill color in excel based on data in the cell
    By Jason Southco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-29-2005, 12:05 PM

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