Regards,
Stefi
„goneil” ezt írta:
Please hit Yes if my comments have helped.
Thanks!
Please hit Yes if my comments have helped.
Thanks!
to insert the current date and time, press CTRL+; (semi-colon), then press
SPACE, and then press CTRL+SHIFT+; (semi-colon).
Please hit Yes if my comments have helped.
Thanks!
To record the timestamp automatically you cannot use a formula. You will
have to use a VBA solution. Select the sheet tab which you want to work with.
Right click the sheet tab and click on 'View Code'. This will launch VBE.
Paste the below code to the right blank portion. Get back to to workbook and
try out.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A20")) Is Nothing Then
If Target.Count = 1 Then _
Range("C" & Target.Row) = Format(Now, "mmm dd, yyyy h:mm AMPM;@")
End If
Application.EnableEvents = True
End Sub
If this post helps click Yes
---------------
Jacob Skaria
Stefi
„trip_to_tokyo” ezt írta:
Past the below code in Excel VBA Module and assign shortcut key for that.
Press ALT+F11 and go to Insert and click Module. And paste the below code.
Sub DateandTime()
ActiveCell = Now()
End Sub
After pasting the code close the VBA and press ALT+F8, the DateandTime Macro
will appear. Just select it and select Options and give your desired
keyboard button as shortcut key to run the macro.
If you want to show the cells including seconds just select the cells and
Goto Format and select custom and paste this format [$-409]m/d/yy h:mm:ss
AM/PM;@
If this post helps, Click Yes!
--------------------
(MS-Exl-Learner)
--------------------
--------------------
(Ms-Exl-Learner)
--------------------
Thank you for your response, much appreciated. I think this may not be
possible and perhaps thats why I cant figure it out on my own (I also don't
know VBA) or with community help.
I have a spreadsheet that I want to record how much time I spend on each
call I make or receive. I need to do it efficiently because I may only spend
1 or 2 minutes on some calls or less but rounded up to a minimum 1 minute.
I want to simply enter the Duration of the call and Nothing Else:
1. Enter call Duration hh mm into separate cells, then populate other cells
by:
2. Get the Current Time
3. Subtract the call duration from Current Time
4. And that becomes my Start Time.
The problem is that the end time keeps updating because it gets the current
timestamp from NOW().
A B C D
Duration -----------Time---------
Hours Mins Start End
1 20 9:40 11:00
(NOW - Duration) (NOW)
Any ideas Stefi?
cheers
George
Open VBA (Alt+F11)!
Right click on your worksheet name in the Project explorer window!
Select View code from the popup menu!
Copy/Paste macro code below in the code window!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <= 2 Then 'columns A and B
Range("C" & Target.Row) = Time - TimeSerial(Range("A" & Target.Row),
Range("B" & Target.Row), 0)
Range("D" & Target.Row) = Time
End If
End Sub