View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Permanent Date/time entery

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

"confused guy and desperately in need !" wrote:

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

"Mike H" wrote:

try,

Ctrl;

Mike

"confused guy and desperately in need !" wrote:

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