Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Permanent Date/time entery
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Permanent Date/time entery
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Permanent Date/time entery
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Permanent Date/time entery
Dear Mike
Thanks very much for your help! very useful.. Best wishes, M.M "Mike H" wrote: 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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Permanent Date/time entery
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 On Apr 26, 3:36*pm, confused guy and desperately in need ! soft.com 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- Hide quoted text - - Show quoted text - |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Permanent Date/time entery
Your welcome and thanks for the feedback
Mike "confused guy and desperately in need !" wrote: Dear Mike Thanks very much for your help! very useful.. Best wishes, M.M "Mike H" wrote: 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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Permanent Date/time entery
Thanks dear Smart Akhtar
Best wishes, M.M "Smart Akhtar" wrote: 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 On Apr 26, 3:36 pm, confused guy and desperately in need ! soft.com 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- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date is not permanent | New Users to Excel | |||
change =NOW() to permanent date string | Excel Programming | |||
permanent time and date stamp for Excel --- so it cant be changed | Excel Discussion (Misc queries) | |||
Date format in permanent list | Excel Discussion (Misc queries) | |||
Set Permanent Date Format to MM//DD/YYYY | Excel Discussion (Misc queries) |