+ Reply to Thread
Results 1 to 5 of 5

How to detect amount of changes in cell?

  1. #1
    Registered User
    Join Date
    05-19-2009
    Location
    Virgin Land, Near Phantasia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Question How to detect amount of changes in cell?

    Hello All!

    I need a macro which quietly counts changes made to a cell and stores them even after the workbook is closed.
    If the cell has been modified more then say 5 times in one day it is highlighted yellow more then 10 highlighted red. Then i need week counts and month counts (years maybe later), hence the ability to store and add amount of changes.

    Any ideas? I so far got this much:

    Please Login or Register  to view this content.
    I was thinking of creating a new list called COUNTING. Say in my DATA list i changed the value of cell A2 from bob to 2. So in my COUNTING list A2 will have a value "today = 1". Hence if i decide to change its value later on in the month it will be "month = 2". also if it is shifted in DATA i.e. moved to a different location then it need to be tracked and moved in COUNTING (basically value mapping).
    has any

    So any ideas? I'm also open to suggestions if any ^^
    Last edited by pike; 12-19-2010 at 12:54 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,588

    Re: How to detect amount of changes in cell?

    You could use a Worksheet_Change event to monitor the cell and record the changes on a hidden worksheet in the workbook.

    You could store both the date and the cell change count so that you can reinitialise daily.

    Needs some thought but it's do-able

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to detect amount of changes in cell?

    Perhaps storing as a Name would be best, then it should be less likely to be deleted accidentally
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    05-19-2009
    Location
    Virgin Land, Near Phantasia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: How to detect amount of changes in cell?

    Quote Originally Posted by TMShucks View Post
    You could use a Worksheet_Change event to monitor the cell and record the changes on a hidden worksheet in the workbook.

    You could store both the date and the cell change count so that you can reinitialize daily.

    Needs some thought but it's do-able

    Regards
    Ill give you a visual example of what i'm trying to do

    Say i have 100 pens, 200 pencils, 300 rulers...

    They all get taken on a daily basis, I want to create a data sheet that if for example my outflow of pens is very high per day, then i want it to be highlighted.

    Also i want see how much material is being given out per week, per month so i would know how much of what i need to purchase to keep my stock on a safe level i.e. i wont be running out pf materials all of a sudden

    So i need to check how much of that particular material is being withdrawn + if it is being withdrawn in batches i.e. is there a pen with drawn once a day 5 pens once a day etc., i hope this clarifies it slightly?

    Let me know if you need any more info...

    Again i just came with this today so it all up in the air

    P.S. its a change tracking system

    ill have a look at the Worksheet_Change event...

  5. #5
    Registered User
    Join Date
    05-19-2009
    Location
    Virgin Land, Near Phantasia
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: How to detect amount of changes in cell?

    Quote Originally Posted by royUK View Post
    Perhaps storing as a Name would be best, then it should be less likely to be deleted accidentally
    Please Login or Register  to view this content.
    I take it this code changes the cells name? doesn't change for me for some reason...
    I was thinking maybe to create an auto comment?
    The thing is if i want to graph the data later on i will have to extract it further. Having it stored in a spare sheet is much easier.

    So as mentioned above, if i have a macro that can date how much of the particular material has been withdrawn i would be able to sum then and have my monthly and yearly figures

    Something like this maybe?

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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