+ Reply to Thread
Results 1 to 6 of 6

system time stamp a cell when change in target cell. ( note target cell is formula ref)

  1. #1
    Registered User
    Join Date
    12-26-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    4

    Post system time stamp a cell when change in target cell. ( note target cell is formula ref)

    Hi All

    I got a task at hand to automate a dashboard

    i need to auto timestamp using system time a particular cell based on any change in the target cell.
    have used the below vba code successfully.
    Private Sub Worksheet_Change(ByVal Target As Range)

    Now going one step further, when i make the target cell formula based i.e (derive its value from some other sheet in the work book)
    the below VBA code doesnt work. it works only when i manually change the value in the target cell as against putting a formula and deriving it

    Please Login or Register  to view this content.
    Will appreciate any quick help on this one.

    Moderators Note: Please follow Forum Rule #3 and use code tags. Added this time, but please use them in the future…Thanks.
    Last edited by jeffreybrown; 12-26-2012 at 12:43 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: system time stamp a cell when change in target cell. ( note target cell is formula ref

    Quote Originally Posted by R_VBA
    ...when i make the target cell formula based i.e (derive its value from some other sheet in the work book)
    the below VBA code doesnt work
    Your choices are either

    a) use a Calculate driven event
    or
    b) move your Change event to the precedent sheet object or Workbook level event

    Regards a) there is no Target in a Calculate event and Calculation can of course be triggered by a large number of Volatile actions - generally you would use a Static / cached variable (or store in hidden name) to identify as to whether or not the cell of interest has actually changed as a result of the calculation

    Personally I would advocate b) - whether to use an alternatve sheet object or the Workbook level event would depend on the number of precedent sheets in question.

    Below is one approach using the Workbook level event as an example... - let's assume for sake of example that the formula on your "Summary" sheet references Sheet1!C1 and Sheet2!E2
    Please Login or Register  to view this content.
    Of course if the immediate precedents are themselves formulae then you need to work back to the "prime mover" cells (or switch to a Calculate event driven approach).

  3. #3
    Registered User
    Join Date
    12-26-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: system time stamp a cell when change in target cell. ( note target cell is formula ref

    Thank you for the suggestions, guess primafacie the second seems suitable.
    can you alter/anhance the code based on more indept insight into the objective please.

    The dashboard is a 'all under one roof' kind of report whihc enables viewing keu performance metrics of 15 different processess.
    The dashboard has one summary sheet & 15 other sheets with respective process indicators.
    Now ideally would like the summary sheet to be untouched and automated as each of the other sheets are going to be editied by 15 different teams.
    can you suggest me how to timeststamp this formual fiedls (the summary sheet is designed just like windows 8 tiles style as to when some one clicks on one tile it takes to the respective sheet.)
    The objective of the time stamp is to know which peocess metric was updated at what time of the day.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: system time stamp a cell when change in target cell. ( note target cell is formula ref

    if it's only one cell I would suggest using the calculate event as it will be more flexible if you need to alter the formula involved
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Registered User
    Join Date
    12-26-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: system time stamp a cell when change in target cell. ( note target cell is formula ref

    how do i modify my code if the values in target cell is changed not manually but by a formula.
    Can the timestamp be updated when the value in target cell is changed based on a formula and not manual intervention??

  6. #6
    Registered User
    Join Date
    12-26-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: system time stamp a cell when change in target cell. ( note target cell is formula ref

    apologies !! missed your earlier suggestion on using a calculate event.
    How to use this even if the target cell in formula driven. Th fromula remains constand all the time and only updates values based on raw data feed

+ 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