+ Reply to Thread
Results 1 to 15 of 15

Calculation change date time stamp

  1. #1
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Exclamation Calculation change date time stamp

    Please please please help! I'm trying to stay away from circular references, so I need a VBA code that can formulate the date a cell changed.

    For example, Column D changes by a formula for "Does not need repair" to "Needs repair". I need Column E to show the date cell D1 changed from "Does not need repair" to "Needs repair". I also need to know how to make the date remain static and then go away when the cell is back to "Does not need repair".

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Calculation change date time stamp

    This needs a simple sheet specific Macro

    I will write one for you.


    Right Click on the sheet name at the bottom of excel and select view code.

    Paste this code into the window that opens and then close it.


    Please Login or Register  to view this content.
    Last edited by mehmetcik; 12-09-2016 at 03:26 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculation change date time stamp

    Circular references are THE way to do this via formula.

    With VBA, you have to check the entire sheet EVERY time any formula on the sheet calculates a change. I'm not sure this is better at all, but it is VBA. This event macro goes in the sheet module:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Re: Calculation change date time stamp

    Quote Originally Posted by mehmetcik View Post
    This needs a simple sheet specific Macro

    I will write one for you.


    Right Click on the sheet name at the bottom of excel and select view code.

    Paste this code into the window that opens and then close it.


    Please Login or Register  to view this content.


    Thank you so much @mehmetcik! For some reason the code isn't running. Is it because the "Needs repair and "Does not need repair" are populated by a formula?

  5. #5
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Re: Calculation change date time stamp

    Quote Originally Posted by JBeaucaire View Post
    Circular references are THE way to do this via formula.

    With VBA, you have to check the entire sheet EVERY time any formula on the sheet calculates a change. I'm not sure this is better at all, but it is VBA. This event macro goes in the sheet module:
    Please Login or Register  to view this content.
    Yours is pulling a date, but then it crashes my excel I already have some VBA codes on other sheet's module. I'm not if they are interfering or what's happening

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Calculation change date time stamp

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculation change date time stamp

    With the use of circular references, this would work smoothly. Why are you dismissing that approach at the gates?

  8. #8
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Re: Calculation change date time stamp

    Quote Originally Posted by mehmetcik View Post
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    I've attached an example workbook.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Re: Calculation change date time stamp

    Hi,

    The circular reference sometimes returns an error. The workbook book will go back to default settings and not enable iterative calculations. Then the file either freezes/locks up or I lose the previous dates that had been calculated before.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculation change date time stamp

    Try this version:
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Re: Calculation change date time stamp

    Quote Originally Posted by JBeaucaire View Post
    Try this version:
    Please Login or Register  to view this content.
    Ah thank you!! It works! But excel keeps crashing when it runs. Is there supposed to be some sort of error statement in the code? I don't understand why excel is crashing now. (Sorry, I'm pretty new with VBA)

  12. #12
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Re: Calculation change date time stamp

    What I'm seeing is that code isn't working with my conditional formatting..

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculation change date time stamp

    Not sure what that means.

  14. #14
    Registered User
    Join Date
    10-26-2016
    Location
    atlanta, georgia
    MS-Off Ver
    2013
    Posts
    11

    Re: Calculation change date time stamp

    I was actually able to get it to work. Thank you for your help!

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculation change date time stamp

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Working days calculation with Time stamp
    By karthik premkumar in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-19-2015, 05:22 AM
  2. Need vba code to change date&time stamp as date format dd-mmm-yy in A:A rng
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2014, 06:08 AM
  3. Date & Time stamp for change in value
    By drguruji in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2014, 04:09 AM
  4. Replies: 3
    Last Post: 11-06-2012, 01:37 AM
  5. How Change the Date \ Time Stamp of a file to a number ? (EXCEL VBA)
    By nawaralobaidi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2012, 12:23 PM
  6. date time stamp - not to change
    By marsha7 in forum Excel General
    Replies: 5
    Last Post: 03-08-2012, 02:46 PM
  7. Excel Status Change w/ Time/Date Stamp
    By ritmoteca in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-14-2007, 10:43 AM

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