ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Insert static time (https://www.excelbanter.com/excel-worksheet-functions/101726-insert-static-time.html)

Maverick

Insert static time
 
I want to insert the exact time (hh:mm:ss) I entered data into another cell.
For example when I enter data in cell C:2 I need the exact time it was
entered displayed in cell C:1.

tim m

Insert static time
 
You might need a small macro to do this instantly. If you have a cell with
the function =NOW() it will give you the time and date as of the time a
recalculation is done. As soon as you make your cell entry you could hit the
F9 recalc button, this will make the cell with =NOW() show the exact time it
is just after you made your entry. This cell will of course change the next
time you do another recalc so you would have to format a cell as time and
then copy...paste special...values to copy the time value so that it will not
change upon recalculation.

"Maverick" wrote:

I want to insert the exact time (hh:mm:ss) I entered data into another cell.
For example when I enter data in cell C:2 I need the exact time it was
entered displayed in cell C:1.


Maverick

Insert static time
 
I don't think that will work for me. A better example is that I need the
exact time (hh:mm:ss) the data was entered in C:1 to be displayed in B:1 and
then the exact time data was entered in C;2 displayed in B:2 etc.

"tim m" wrote:

You might need a small macro to do this instantly. If you have a cell with
the function =NOW() it will give you the time and date as of the time a
recalculation is done. As soon as you make your cell entry you could hit the
F9 recalc button, this will make the cell with =NOW() show the exact time it
is just after you made your entry. This cell will of course change the next
time you do another recalc so you would have to format a cell as time and
then copy...paste special...values to copy the time value so that it will not
change upon recalculation.

"Maverick" wrote:

I want to insert the exact time (hh:mm:ss) I entered data into another cell.
For example when I enter data in cell C:2 I need the exact time it was
entered displayed in cell C:1.


Peo Sjoblom

Insert static time
 
Any of these 2 methods

http://www.mcgimpsey.com/excel/timestamp.html


--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com



"Maverick" wrote in message
...
I don't think that will work for me. A better example is that I need the
exact time (hh:mm:ss) the data was entered in C:1 to be displayed in B:1
and
then the exact time data was entered in C;2 displayed in B:2 etc.

"tim m" wrote:

You might need a small macro to do this instantly. If you have a cell
with
the function =NOW() it will give you the time and date as of the time a
recalculation is done. As soon as you make your cell entry you could hit
the
F9 recalc button, this will make the cell with =NOW() show the exact time
it
is just after you made your entry. This cell will of course change the
next
time you do another recalc so you would have to format a cell as time and
then copy...paste special...values to copy the time value so that it will
not
change upon recalculation.

"Maverick" wrote:

I want to insert the exact time (hh:mm:ss) I entered data into another
cell.
For example when I enter data in cell C:2 I need the exact time it was
entered displayed in cell C:1.




Bob Phillips

Insert static time
 
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "C1:C10" '<--- Change to suit

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.Offset(0, -1).Value = Format(Time, "hh:mm:ss")
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Maverick" wrote in message
...
I don't think that will work for me. A better example is that I need the
exact time (hh:mm:ss) the data was entered in C:1 to be displayed in B:1

and
then the exact time data was entered in C;2 displayed in B:2 etc.

"tim m" wrote:

You might need a small macro to do this instantly. If you have a cell

with
the function =NOW() it will give you the time and date as of the time a
recalculation is done. As soon as you make your cell entry you could

hit the
F9 recalc button, this will make the cell with =NOW() show the exact

time it
is just after you made your entry. This cell will of course change the

next
time you do another recalc so you would have to format a cell as time

and
then copy...paste special...values to copy the time value so that it

will not
change upon recalculation.

"Maverick" wrote:

I want to insert the exact time (hh:mm:ss) I entered data into another

cell.
For example when I enter data in cell C:2 I need the exact time it was
entered displayed in cell C:1.




Trevor Shuttleworth

Insert static time
 
Very basic code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C1:C2")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Offset(0, -1) = Now()
Application.EnableEvents = True
End Sub

.... in the worksheet class module for the sheet where you are entering data.

Regards

Trevor


"Maverick" wrote in message
...
I don't think that will work for me. A better example is that I need the
exact time (hh:mm:ss) the data was entered in C:1 to be displayed in B:1
and
then the exact time data was entered in C;2 displayed in B:2 etc.

"tim m" wrote:

You might need a small macro to do this instantly. If you have a cell
with
the function =NOW() it will give you the time and date as of the time a
recalculation is done. As soon as you make your cell entry you could hit
the
F9 recalc button, this will make the cell with =NOW() show the exact time
it
is just after you made your entry. This cell will of course change the
next
time you do another recalc so you would have to format a cell as time and
then copy...paste special...values to copy the time value so that it will
not
change upon recalculation.

"Maverick" wrote:

I want to insert the exact time (hh:mm:ss) I entered data into another
cell.
For example when I enter data in cell C:2 I need the exact time it was
entered displayed in cell C:1.





All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com