Date Stamping a value.

wudhus_kid

New Member
Joined
Aug 8, 2007
Messages
31
Is there any way of the date of entry of a value being entered into a cell?

So, for example, if I enter a value into cell A1 on 1st July 2007, the worksheet automatically enters 01/07/2007 into cell A2.

Any help on this matter would be much appreciated.

Many Thanks.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Right-click the worksheet tab and select “view code”. Paste this into the window that opens and then close the window down again:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 Then
    Target.Offset(1, 0) = Date
End If
End Sub
This will put the date in row 2 every time a value is entered in row 1.
 
Upvote 0
Hi paste this into the worksheet module

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    
Dim rng As Range
Set rng = Range("A:A")
 
 If Target.Count > 1 Then Exit Sub
   If Intersect(Target, rng) Is Nothing Then Exit Sub
            
   ActiveCell.Offset(-1, 1).Value = Date
   
            
End Sub

Ah, beaten to it !
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,447
Members
448,898
Latest member
drewmorgan128

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