View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = "$B$2" Then
Range("A2").Value = Format(Date, "dd mmm yyyy")
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.




--
HTH

Bob Phillips

"Dayne Dillon" <Dayne wrote in message
...
Hi
I am trying to write a formula that will enter the date in field A2 if

there
is text in B2 but the date must be the date when B2 was typed into and not
todays date.any help will be appreciated.
Thanks
Dayne