Date Update
Worked a treat, thanks!
"Andy Brown" wrote:
"Nigel" wrote in message
...
I have a spreadsheet in which I type information after contacting a client.
Next to this cell I put the date that I contacted that client. I often
have
to contact the same client and overtype the information that was
previously
in that cell. Is there a way to automatically update the date after I
overtype their information so that it shows when I last contacted that
client?
You could do this with some VBA code -- specifically an "event procedure".
Rightclick the sheet tab and select "View Code" from the pop-up menu to
access the VBA module for the sheet. Then paste this into the module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Selection.Cells.Count < 1 Then Exit Sub
If Target.Column = 1 Then
Target.Offset(0, 1) = Date
End If
End Sub
It assumes that the "info column" is A (Target.Column = 1) and the date
column is B (Target.Offset(0, 1), i.e. one to the right), so change those to
suit if necessary.
Alternatively, you could just use the kb shrtcut for insert current date
(CTRL+;).
|