Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Automatically Timestamp Data Entries in Excel

0

I viewed your tutotial on

Automatically Timestamp Data Entries in Excel

Looks like i got it to work now, great code!!! thanks. One thing, how do you code it when you delete the date it deletes the input time and update time as well

Answer
Discuss

Answers

0

Thanks, I'm glad it works for you :)

To clear the cells, you just check for the cell that was changed again and see if it is now empty and then set the value of the date/time cell to ""

I haven't seen the timestamp code in a while but I believe that the setup for doing this is already in the macro and that you can follow the pattern in the tutorial to update it for your needs. If not, post a sample file thta shows what you're working with.

Discuss
0

You don't code to "delete the date it deletes" because that would defeat the objective of having a time stamp at all. Instead, when you come to a situation where there is already a time stamp you must decide what you want to do.

  1. Over-write the existing time stamp with a new one, or
  2. Disallow the change.

The choice is dictated by your workflow. You might even want to allow a change made the same day but not if it's done at another time. I sometimes have projects where only the last row may be changed but not one that was created earlier.

To modify existing code to accommodate such wishes it's necessary to see the code, as Don has already said, and to know your exact plan, I want to add.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login