Automatic Timestamp question/help

matt179

New Member
Joined
Sep 16, 2011
Messages
30
Hello,

Im a complete novice at excel, i know a few basic functions and thats all and need help creating an automatic timestamp.

I need a function or a macro to insert the Time automatically into collumn D2 after ive inserted text into C3, once this timestamp is inserted i dont want it to change if you edit any of the text in the line.

I dont know how to do complex things in excel so if someone knows how to do what i want and could help me out, might need some help explaining if its complex but i would greatly appriciate it.

Thanks in advance...
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try this: right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "C3" And Range("D2").Value = "" Then
    Application.EnableEvents = False
    Range("D2").Value = Now
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0
That works great, although i dont want the date just the time if possible?

And what i need is for this to work for every D column, so if i input data into C column, e.g. C42 it'll put the time into C42 and so on.

As i have multiple sheets, 7, 1 for each day, can you just copy and paste it onto each individual sheet?
 
Upvote 0
Try this - you can use this on as many sheets as you wish

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 And Target.Offset(, 1).Value = "" Then
    Application.EnableEvents = False
    Target.Offset(, 1).Value = Time
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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