Permanent Date/time entery

  • Thread starter Thread starter confused guy and desperately in need !
  • Start date Start date
C

confused guy and desperately in need !

Hi all

i am wondering if there is any way to be able to get a date into the cell
automatically but it stay as it is without being updated after closing and
reopening the file. what i mean is that i want to put some data in one cell
and the other cell shows the date of entery automatically, this part is easy
we can use now() function or even date and so on but the problem is that
these functions get updated (i.e when i come back the next day to the file
what i see is the date of the new day , now is there any way that excel keep
the first date he got from the function as it is ?

that would be a great help indeed.
thanks in advance
M.M
 
Thanks dear Mike

the thing is that this is the way i knew about it and it is based on
entering the data but by using shortcut , i would like as i said it before it
be done automatically , suppose i like to luck the cell to avoid any
misentery of the date then i cant use Ctrl+; but i need excel to do the job
for me ?! any suggestion pls?

Best wishes,
M.M
 
Hi,

This works on A1 to a10 so change the range to suit. Right click the sheet
tab, view cod and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
mydate = Format(Now, "dd mmmm yy")
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Application.EnableEvents = False
If Target.Value <> "" Then
Target.Offset(, 1) = mydate
Else
Target.Offset(, 1) = ""
End If
Application.EnableEvents = True
End If
End Sub

Mike
 
Dear Mike

Thanks very much for your help! very useful..

Best wishes,
M.M
 
Hi, MM
Try this. code. just right click on the sheet tab. select sheet code
and past this code, this code will insert current data in to c colum,
change the value what eve suit u.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rw As String
If Target.Column = 3 Then
Application.SendKeys "^;"
End If
End Sub
 
Your welcome and thanks for the feedback

Mike

confused guy and desperately in need ! said:
Dear Mike

Thanks very much for your help! very useful..

Best wishes,
M.M
 
Thanks dear Smart Akhtar

Best wishes,
M.M

Smart Akhtar said:
Hi, MM
Try this. code. just right click on the sheet tab. select sheet code
and past this code, this code will insert current data in to c colum,
change the value what eve suit u.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rw As String
If Target.Column = 3 Then
Application.SendKeys "^;"
End If
End Sub
 

Ask a Question

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.

Ask a Question

Similar Threads


Back
Top