Auto date stamp once only

T

Telsys NZ

I wish to create a register that when a cell is changed/data entered date stamps/records in another cell and remains that date no matter how many times the work book is opened or closed - have tried NOW, TODAY but these all change when the workbook is opened on a different day. PLease help
 
E

Earl Kiosterud

Telsys,

Paste the following code into the sheet module for the sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
Range("A2") = Now()
End If
End Sub

It's better to name the cells (Name box, or Insert - Name - Define), then
refer to them by name:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("MyCell")) Is Nothing Then
Range("MyDate") = Now()
End If
End Sub

That way, if they get moved, your code still works
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

Telsys NZ said:
I wish to create a register that when a cell is changed/data entered date
stamps/records in another cell and remains that date no matter how many
times the work book is opened or closed - have tried NOW, TODAY but these
all change when the workbook is opened on a different day. PLease help
 
F

Frank Kabel

Hi
you may also have a look at
http://www.mcgimpsey.com/excel/timestamp.html

--
Regards
Frank Kabel
Frankfurt, Germany

Telsys NZ said:
I wish to create a register that when a cell is changed/data entered
date stamps/records in another cell and remains that date no matter how
many times the work book is opened or closed - have tried NOW, TODAY
but these all change when the workbook is opened on a different day.
PLease help
 
Top