View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default Inserting a date when cell is changed

Here is some code for you to try. It only works if C7 is a constant and not a
formula. Right click the sheet tab and select view code and then paste this...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$7" Then Range("F26").Value = Date
End Sub
--
HTH...

Jim Thomlinson


"Gavin Ling" wrote:


Hi.

I need Excel to insert a date in a certain cell (F26) when another cell
is altered (C7). The trouble is that the date entered in F26 mustn't
change, it must always read as the date when C7 was altered.


I can't seem to make it work without the date constantly changing to
the new day's date.

Gavin


--
Gavin Ling
------------------------------------------------------------------------
Gavin Ling's Profile: http://www.excelforum.com/member.php...o&userid=30110
View this thread: http://www.excelforum.com/showthread...hreadid=512015