i want to do that as i enter any name in a cell and press enter its automaticly collect the date and time from system to next cell how can i do this plz help me !! thankx
Sub GetDate()
Sheets("sheet1").Select
If ActiveCell.Column = 1 And _
ActiveCell.Row > 3 _
And Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(0, 1) = Now()
End If
End Sub
It places the date into column B provided that the row is
greater than 3. Change the sheet, row and column to suit.
Right click the sheet tab and select View Code. Copy and paste th
following macro. You may need to change the column number (etc).
'-------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If ActiveCell.Column = 1 Then
ActiveCell.Offset(0, 1).Value = Format(Now, "dd/mm/yy")
End If
End Sub
'-------------------------------------------------------
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.