Lock in date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to lock in a date that an entry is made. Ex: Col A1:A10
contains a formula to indicate a date that entry is made is B1:B10.

The formula setup in A1 that comes to mind is: =IF(B1="","",TODAY()). But
that date changes with each day. I want to lock in the date an entry is made.

Thanks,
Les
 
You need a change event sub to do that:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Then
Application.EnableEvents = False
Range("A" & Target.Row) = Date
Application.EnableEvents = True
End If
End Sub

Regards,
Stefi


„WLMPilot†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top