How To Date and Timestamp Automatically When Another Cell Changes

tjeacret

New Member
Joined
Oct 22, 2010
Messages
22
Hello! I have a question on how to make this work. I need Cell E1 to update automatically with the current date and time stamp when a cell in range A5:O21 changes. How can I make that happen? Thanks for your help!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
So I tried that, got it in there. When I paste data into the cell range, it doesn't time stamp. If I physically enter data, it does. I need this to work when data may be pasted in as well. Any ideas?
 
Upvote 0
So I tried that, got it in there. When I paste data into the cell range, it doesn't time stamp. If I physically enter data, it does. I need this to work when data may be pasted in as well. Any ideas?
Sorry, I'm not sure how to deal with that.

We'll have to wait for someone else to stop by and make a suggestion.
 
Upvote 0
paste this in your worksheet --- you may have to format your cell
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A5:o21")) Is Nothing Then
Range("E1").Value = Now()
Application.EnableEvents = True
End If
End Sub
 
Upvote 0
Hi,

I've used the mcgimpsey link and it works great but how do I go about editing the VB code so that I can repeat it for other columns. My input columns are A. C and E and my timestamp columns are B, D and F. As data is entered into A, C or E they need to output their own timestamp. Any ideas?

Thanks,
Dave
 
Upvote 0
Try

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
Select Case Target.Column
    Case 1, 3, 5
        If Target.Value = "" Then
            Target.Offset(, 1).ClearContents
        Else
            Target.Offset(, 1).Value = Now
        End If
End Select
Application.EnableEvents = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,172
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top