• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Date formula

dchatrie

New Member
I am attemting to create an excel database and would like the last entry to be time stamped. Example if I updated the database yesterday, when i open it this morning I should be able to know it was last updated yesterday.


Thank you for your assistance.
 
I would probably add a timestamp to every entry and then look for the last entry in your database upon opening the workbook. For every new entry into your database, you might try something like:

[pre]
Code:
ActiveSheet.Cells(currentRow, timeStampColumn).Value = Now
[/pre]
Obviously, you can replace currentRow or timeStampColumn, but you do want to keep the part where you set the cell's value to Now. Now is an timestamp of the current time and date, which is available as an internal variable for use in the VBE. It is not a variable that needs to be declared.
 
Hi dchatrie,


Instead of writing a formula using "= and then click on FX..

Just press.. (Ctrl + ;) Space (Ctrl + :) will gives you TimeStamp..


Regards,

Deb
 
Hi dchatrie ,


I am not sure I have understood your requirement ; your first sentence says you would like the last entry to be time-stamped ; your next sentence says when you open the workbook you would like to know when it was last updated ; these are not necessarily the same.


If you need to know when a workbook was last updated , you can have the Workbook_BeforeClose event put the timestamp before exiting ; you can use the Workbook_SheetChange event to ensure that some cell in the workbook has been changed.


Narayan
 
I can't imagine non-automated way of knowing the date of the last input without some VBA. You could use NOW() as a formula in Excel (for example, "=NOW()"), but every time there's a calculation, the formula will update to the most current point in time. If you do not want to use VBA, then you will have to find a manual way of capturing the last date of input - which might just be typing in a date for each entry. But perhaps the ninja's know better than me.
 
Back
Top