ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Time (https://www.excelbanter.com/excel-worksheet-functions/157864-time.html)

jacksonsgurl

Time
 
How do you get a cell ixed to where you can click on it and the current time
automatically comes up and does not continue to follow the time clock after
you have selected the cell and clicked off of it? I am trying to make a
dispatch sheet for when my rescue squad has a call at a fair that we provide
support for. Any help anyone can give me would be great.

Pete_UK

Time
 
Not sure about clicking, but if you select a cell then do CTRL-SHIFT-
colon this will fix the time in that cell.

CTRL-semicolon will fix the date.

Hope this helps.

Pete

On Sep 11, 5:28 pm, jacksonsgurl
wrote:
How do you get a cell ixed to where you can click on it and the current time
automatically comes up and does not continue to follow the time clock after
you have selected the cell and clicked off of it? I am trying to make a
dispatch sheet for when my rescue squad has a call at a fair that we provide
support for. Any help anyone can give me would be great.




Gord Dibben

Time
 
CTRL + SHIFT + semi-colon will enter a staic time in a cell.

Another method would require event code to enter the static time when an event
takes place like a double-click on any cell.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
With Target
.Value = Format(Now, "hh:mm:ss")
End With
Cancel = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into the module that opens.

If you prefer this to operate on just one column use the code below which will
enter the time into column A cells only...........

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
If Target.Cells.Column = 1 Then
With Target
.Value = Format(Now, "hh:mm:ss")
End With
End If
Cancel = True
End Sub


Gord Dibben MS Excel MVP

On Tue, 11 Sep 2007 09:28:06 -0700, jacksonsgurl
wrote:

How do you get a cell ixed to where you can click on it and the current time
automatically comes up and does not continue to follow the time clock after
you have selected the cell and clicked off of it? I am trying to make a
dispatch sheet for when my rescue squad has a call at a fair that we provide
support for. Any help anyone can give me would be great.




All times are GMT +1. The time now is 01:33 AM.

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