View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
DDavid DDavid is offline
external usenet poster
 
Posts: 20
Default Auto tag the time in B1 to an entry in cell A!


What is the difference from the last post solution?

Is there a reason for not using any of both?


On 5 nov, 14:04, Gord Dibben <gorddibbATshawDOTca wrote:
Event code is a good way to go to get a static time stamp in a cell.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in any cell in Col A, time into column B
On Error GoTo enditall
* * Application.EnableEvents = False
* * * * If Target.Cells.Column = 1 Then
* * * * * * *n = Target.Row
* * * * * * * * If Me.Range("A" & n).Value < "" Then
* * * * * * Me.Range("B" & n).Value = Now
* * * * End If
* * End If
enditall:
* * Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste into that module. *Edit to suit then Alt + q to return to the
Excel window.

Gord Dibben *MS Excel MVP

On Wed, 5 Nov 2008 06:54:23 -0800 (PST), DDavid
wrote:

Hi guys,


I need to get a solution for this.


If write a data in Cell A1, how can I get in cell B1 the time on what
this data was writen.


Thanks in advance.


ADC