ctrl+shift+; trying to get the seconds to show up???

striperbooter

New Member
Joined
Mar 3, 2003
Messages
9
After trying to get a time to show seconds wiht a command button i thoughti would come back to the basic's and see if I could not get this short cut to work??? I have formated all the cells wiht the hh:mm:ss so that it should show hours: minutes:seconds but when i hit the ctrl+shift+; the seconds allways default to 00? any ideas or help would be great .. what i a tryig to do is input a time when a car comes into a intersection and then again when it leaves and then find out the gap in time between the two?? all total there will be four colums A: lane 1 car enters the intersection, B: lane 1 car leaves the intersection, C:lane 2 car enters the intersection, d: lane 2 car leaves the intersection so that is where i am at?? and once again thanks for all your help on this problem and look forward to hearing from some of you!!!
zc
 
Hi Stripper Booter,


You are right.I don't know why this happens :o

Anyway,if you still want to use the same key combination while stil getting the seconds displayed then do the following:

Select the range of cells you want to enter the Time in.

Give it a name Say For example "DATA" (You can do this via the Name Box to the left of the Formula Bar)

Right click the worksheet Tab,choose View Code and paste the following code:


Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Union(Target, Range("DATA")).Address _
    = Range("DATA").Address Then
        Application.OnKey "^+;", "TimeStamp"
    Else
        Application.OnKey "^+;"
    End If

End Sub



In a Standard Module in the same workbook paste this code:


Code:
Public Sub TimeStamp()
    ActiveCell.Value = Format(Now, "hh:mm:ss")
End Sub

Hope this helps.
 
Upvote 0
rafaaj2000 you da man !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

it works great!!!!!
thanks again!!!!
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top