Date stamp onto Worksheet

Bowdlerb

New Member
Joined
Mar 6, 2002
Messages
11
I have an Excel Spreadsheet that I would like the date it is first opened to be inserted into a cell. I do not want the date to be updated if the file is subsequently opened and/or saved.
Is there a way I can do this?
Regards,
Barrie Bowdler :oops:
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I'm a bit confused by this. If you have this spreadsheet already, then it has already been opened. So any subsequent opening will never be recorded per your requirements.

Are you talking about opening a blank, new spreadsheet?
 
Upvote 0
you could write a macro, store it in your personal.xls file (in a module), assign it to a button, and then call it when you open the desired sheet.

hope i've not misread.
 
Upvote 0
Recommend using an "Auto_Open" macro to check and see if the target cell is blank, and if so, place the current date there. Once the date occupies the cell, it will not be changed again.

Yes, the requirement is a little cloudy. *G*
 
Upvote 0
Adding to what's already been said is this any use?

Code:
Private Sub Workbook_Open()
If [a1].Value <> "" Then Exit Sub
   [a1].Value = Format(Now, "dd/mm/yy hh:mm:ss")
End Sub

To use the code whilst in xl hit Alt+F11. On the left hand side you should see the project explorer window (if not hit Ctrl+R). You should see your workbook listed as VBAProject (yourworkbook name) - double click on the ThisWorkbook module. Paste the code into this.

HTH
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top