Questions

Date Stamp in Excel

+
0 Votes
Locked

Date Stamp in Excel

johnsonsoftware
I am looking or a way to date stamp Excel spreadsheets with a creation date that won't change when the spreadsheet is updated. I do not want to have to key in the date, it should be an automatic date stamp. I saw something that said naming the formula '=TEXT(TODAY(),"dd-mmm-yyyy")' and using that range name where you want the date stamp would work, however, everytime I re-open the worksheet, the today() function updates the date. Back in the day, I used to create date stamps in a Lotus macro that didn't change. Anybody know a way?
+
0 Votes
davidliu
Collapse -

Private Sub Workbook_Open()
Sheets(1).Activate
If Range("A1") = "" Then Range("A1") = Now()
End Sub

+
0 Votes
vo_yager
Collapse -

To Stamp Date Only, press Ctrl + ;

To Stamp Time Only, press Ctrl + Shift + :

If you want to use Macro
1. Press Alt & F11 [Open the VB Editor]
2. Select Module from Insert Menu
3. Copy & Paste below code into the Module
4. =fDate() [Use it like any Function]

Option Explicit
'---------------------------------------------------------------------------------------
' Function : fDate()
' Purpose : Add a fixed date to a cell
' Date : 20-Apr-12
' Website : www.rain-forest-forum.com
'---------------------------------------------------------------------------------------
'
Function fDate()
fDate = Date
End Function