+ Reply to Thread
Results 1 to 10 of 10

Automatically changing the date when a cell changes value

  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    38

    Automatically changing the date when a cell changes value

    Hi
    I understand the formula NOW() will allow me to have the date and time automatically change when a cell is altered anywhere on my worksheet. What I want to do is create a formula where if a specific cell is changed the date and time will automatically change only if that specific cell is altered. For example if the value in c2 is altered then the date and time is automatically changed to reflect that but if d2 was altered nothing would happen. I think an IF function would work here but if it does what would I need to write as the logical test? =if(logical test(change in value),Value if true (now()),value if false(No change)). Am I heading in the right direction or am I way off? I understand there is VBA codes for this I just thought I would try it without VBA.
    Any help would be greatly appreciated

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Automatically changing the date when a cell changes value

    Yes, this can be done using the attached sheet, as an example.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Automatically changing the date when a cell changes value

    Sorry, I forgot to add - this is a self-referencing formula (a.k.a. circular reference). You need to enable iterative calculations by hitting (in E 2007...) : Big Excel Button, Excel Options, Formulas & then clicking the enable iterative calculations box.

    The example is formatted for date, but you can re-format for date:time from custom formatting if you wish.

  4. #4
    Registered User
    Join Date
    09-16-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Automatically changing the date when a cell changes value

    Thanks for that it works well except if I try to overwrite a previous entry then it wont update automatically. It only works if it is a fresh entry

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Automatically changing the date when a cell changes value

    Dohh. Try agai. Most people want a totally static datestamp. So try this. There's a bit of code that updates the date:time in B2 when A2 is altered. Is this more like what you want?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-16-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Automatically changing the date when a cell changes value

    Thanks heaps for that. That's what I was looking for. So I am guessing this can't be done without VBA?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Automatically changing the date when a cell changes value

    Nope. I'm totally cr@p at VB (seriously totally cr@p, to be truthful). So, if I can get it to work - anyone can!! Just copy the code as needed.

    If that's it can you mark the thread as solved. it would also be nice if you clicked the add Reputation button at the foot of this post.

  8. #8
    Registered User
    Join Date
    09-16-2013
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Automatically changing the date when a cell changes value

    Im terrible at VBA myself but I was hoping there would be a formula that would do this. You have been very helpful at least and I now have answer to my question

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Automatically changing the date when a cell changes value

    it will update if you clear contents then re-enter you cant overwrite and just enter
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Automatically changing the date when a cell changes value

    Quote Originally Posted by martindwilson View Post
    it will update if you clear contents then re-enter you cant overwrite and just enter
    It works for me... if I type anything into A2, the datestamp in B2 updates instantly. No need to clear it. (or was Martin referring to my first attempt??)

    Yes - he was. And he's right. I never noticed that before - on my first effort (post #2), if you delete the value in col A first, before entering something else, the datestamp updates.
    Last edited by Glenn Kennedy; 07-05-2014 at 11:34 AM.

+ 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. Excel 2007 : sorting date and changing value automatically
    By sree5krishnan in forum Excel General
    Replies: 1
    Last Post: 11-17-2011, 04:11 AM
  2. automatically changing date
    By asawyer3 in forum Excel General
    Replies: 1
    Last Post: 06-13-2011, 01:42 PM
  3. Automatically Changing a Value on a Set Date?
    By LilyMay in forum Excel General
    Replies: 1
    Last Post: 01-20-2010, 04:27 PM
  4. Automatically changing cell value on a given date
    By plainlazy84 in forum Excel General
    Replies: 7
    Last Post: 10-13-2008, 05:10 PM
  5. Changing Cell formats to date fields automatically
    By PCLIVE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2005, 06:06 PM

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