Stop date changing each day?

B

Bob Vance

--
=IF(ISNUMBER(A2), TODAY(),"")
I have this formula so as the date shows when I put a number in A2, how can
it be changed so as it does not change to always current date?
Also could it be modified so as number or text activates the date entered


Thanks in advance for your help....Bob Vance
 
J

Jason Morin

Bob-

You'll need a worksheet change event macro to do this.
This will place the date into B2. Right-click on the
worksheet tab, View Code, and paste this macro into the
window:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Count > 1 Then Exit Sub
If Intersect(Target, Range("A2")) Is Nothing Then Exit
Sub

On Error GoTo Errorline:

Application.EnableEvents = False
With Target
If Len(.Value) > 0 Then
.Offset(, 1) = Format(Now(), "mm/dd/yy")
End If
End With

Errorline:
Application.EnableEvents = True

End Sub
 
J

Jason Morin

Yes...try changing "A2" to "A:A" (untested).
-----Original Message-----
Great ,can I make the whole column A the target???

--



Thanks in advance for your help....Bob Vance



.
 
B

Bob Vance

Just keep getting a compile error on your script, do I copy everything from
option to end sub??
 

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

Top