Excel Need help with Macros for excel.

Joined
May 13, 2010
Messages
1
Reaction score
0
I am trying to get excel to auto fill the date into B and time into C when I enter a number into A. That I can do, but I also need it to enter the date into D and time into E when I remove a number in A. This is the code I am using to have excel enter the date time now:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set a = Range("A:A")
If Target.Count > 1 Then Exit Sub
If Intersect(t, a) Is Nothing Then Exit Sub
Application.EnableEvents = False
t.Offset(0, 1).Value = Date
t.Offset(0, 2).Value = Time
End Sub


This works perfectly for the first half of what I need I have tried many other macros that are suppose to autoremove info but it clashes with this macro and the last time I used excel was when all it would do was SUM AVG ect. So this is all new to me any help would be much appreciated.
 
Last edited:
Back
Top