Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Excel

0

I have added the VBA for the Automatic Time Stamp and Update Time Stamp.  This works great for all manually entered information.  However, my initial entries are a paste of client demographics. If I am pasting over one client it works great!!  If I paste over more than one at a time the auto stamp only auto populates for the first entry of the group.  If I then use Control D (with the Table range including the date column) to populate the date down to the other rows this does not trigger the update cell to auto stamp.  I work with hundreds of entries a day. Being able to bring multiple entries in with paste.  Question:  Is there anything I can add which will auto stamp each entry when multiple entries are brought in with paste values?

Code_Goes_Here

Private Sub Worksheet_Change(ByVal Target As Range)

' Auto Date

Dim myTableRange As Range

Dim myDateTimeRange As Range

Dim myUpdateRange As Range

Set myTableRange = Range("B2:AQ800")

If Intersect(Target, myTableRange) Is Nothing Then Exit Sub

Application.EnableEvents = False

Set myDateTimeRange = Range("B" & Target.Row)

Set myUpdateRange = Range("AR" & Target.Row)

If myDateTimeRange.Value = "" Then

    myDateTimeRange.Value = Now

End If

myUpdateRange.Value = Now

Application.EnableEvents = True

End Sub

Answer
Discuss

Discussion

Hi and welcome to the Forum
I can answer this when I get back to my PC but, before I do, a favour please...

Your question title "Excel" doesn't help anyone with a similar problem. Please EDIT your original question to make the title something informative, like "Using Automatic Time Stamp macro with multiple cells"

It would also help if you put the code between the CODE tags (replacing "Code_Goes_Here" only). Thanks
John_Ru (rep: 6142) Sep 21, '21 at 2:42 pm
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login