Date Stamp for a single cell

jtsains

Board Regular
Joined
Apr 29, 2011
Messages
103
I am trying to create a date stamp for a single cell. My intent is to have a read only copy of a workbook that when opened will populate the date. Then when the document is emailed to another user, the date will remain the same as the original date, even after reopening it.

Since it is a read only document, when the document is closed by the original user, it will reset and date stamp again the next time it is opened.


Any suggestions on how to make this happen? I have seen code on how to make a range of cells date stamp, but I can't make it work for my specific situation.

Cell B5 is where the date stamp should reside and not change when emailed to the other user.

Thank you in advance for your support.:)
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I don't see how this is possible with a read-only workbook. You could add the timestamp but you wouldn't be able to save it :confused:
 
Upvote 0
After several hours of research, i found what i needed. Here is the code incase anyone ever needs it.

Public Function Stamp() As String
Stamp = (Date)
End Function

Then in the cell needing the data add the formula =Stamp()

;)

Yeah me!
 
Upvote 0
That's true if i was the one entering the data every time, but when you have 80 people using the sheet and they don't know that then it is easier to make the formula do it for them. :)
 
Upvote 0
One correction is to add the formula below to the cell where you want the date stamp. (in this formula, it assumes that B12 is a field that will be manually updated by the user. Then once B12 is updated to include data, the date stamp will be added.:cool:


=IF(B12="","",Stamp())
 
Upvote 0
In addition, if you want a date stamp to stick based on a cell update, you could also use this code and no formula in the cell:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C1")) Is Nothing Then
Target.Offset(0, 2) = Date
End If
End Sub

Whereas cell C1 is the updated cell and Cell E1 is the cell to stamp the date.

This formula can be used with columns instead of just a single cell, but for my purposes this solved my support needs. hopefully my research can be used by others too.

;)
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,451
Members
452,915
Latest member
hannnahheileen

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