Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2021, 12:40 PM
yoshi yoshi is offline Format number for time , hh:mm:ss,,,second appears 00 Windows 10 Format number for time , hh:mm:ss,,,second appears 00 Office 2016
Novice
Format number for time , hh:mm:ss,,,second appears 00
 
Join Date: Apr 2021
Posts: 2
yoshi is on a distinguished road
Default Format number for time , hh:mm:ss,,,second appears 00

I'd like to format for number for time to figure out total time of particular task like stop watch in second.

example; A1,B1 and C1 all formatted to hh:mm:ss
Enter start time in A1 then enter finish time in B1
C1 is formula =B1-A1

Result is all column show only hour and minutes, second is always 00. Like,,

12:20:00 12:23:00 00:03:00



How to set second section to be shown?? like ,

12:20:25 12:23:48 00:03:23
Reply With Quote
  #2  
Old 04-24-2021, 12:52 PM
rollis13's Avatar
rollis13 rollis13 is offline Format number for time , hh:mm:ss,,,second appears 00 Windows 10 Format number for time , hh:mm:ss,,,second appears 00 Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 140
rollis13 will become famous soon enough
Default

Do cell A1 and B1 have formulas? if yes, are the dependent cells rounded (or have some other format) ?
What do the cells A1:C1 show if you type .512 ?

Last edited by rollis13; 04-25-2021 at 12:03 AM.
Reply With Quote
  #3  
Old 04-24-2021, 02:51 PM
yoshi yoshi is offline Format number for time , hh:mm:ss,,,second appears 00 Windows 10 Format number for time , hh:mm:ss,,,second appears 00 Office 2016
Novice
Format number for time , hh:mm:ss,,,second appears 00
 
Join Date: Apr 2021
Posts: 2
yoshi is on a distinguished road
Default

I enter time by press, "ctrl""shift"and ";" in A1 and B1, no formula in A1 and B1
Reply With Quote
  #4  
Old 04-25-2021, 12:31 AM
rollis13's Avatar
rollis13 rollis13 is offline Format number for time , hh:mm:ss,,,second appears 00 Windows 10 Format number for time , hh:mm:ss,,,second appears 00 Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 140
rollis13 will become famous soon enough
Default

That's it, if Time is inserted with the keyboard shortcut the seconds will always be :00 .
The only workaround I know is to use a macro and assign it to a key combination.
Example: Ctrl+t (t for time )
Code:
Option Explicit
Sub Data()
    ActiveCell.Value = Format(Now(), "hh:mm:ss")
    'ActiveCell.Value = Format(Time(), "hh:mm:ss")
End Sub
Reply With Quote
  #5  
Old 04-26-2021, 03:11 AM
p45cal's Avatar
p45cal p45cal is offline Format number for time , hh:mm:ss,,,second appears 00 Windows 10 Format number for time , hh:mm:ss,,,second appears 00 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

Quote:
Originally Posted by rollis13 View Post
and assign it to a key combination.
Example: Ctrl+t (t for time )
The user interface dialogue box (Alt+F8 from the keyboard) Options… button only allows you to use letters, you can (since you're already using macros) assign the same key combination you're used to using (Ctrl+Shift+colon) to that macro with:
Code:
Application.OnKey "+^:", "Data"
You could run that one-liner on workbook open, or when you activate that sheet, with the likes of:
Code:
Private Sub Workbook_Open()
Application.OnKey "+^:", "Data"
End Sub
in the ThisWorkbook's code-module,
or in the sheet concerned's code-module:
Code:
Private Sub Worksheet_Activate()
Application.OnKey "+^:", "Data"
End Sub
It's polite to restore the original functionality when you no longer need it which you can do with the one liner:
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnKey "+^:"
End Sub
but for such a trivial change you probably don't want to bother; it'll be restored when you next open Excel anyway.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format number for time , hh:mm:ss,,,second appears 00 Sequential Numbering A Document When The Same Number Appears Twice on a Page Auxiliaryman COB Word 3 08-02-2017 03:10 PM
Outlook - Recieved emails Sender address appears differnt each time scotchtech@outlook.com Outlook 0 02-24-2017 02:34 PM
Format number for time , hh:mm:ss,,,second appears 00 How to format a TOC (level 1) using a number, but have the number hidden in the text porpoiseoil Word 1 09-13-2014 12:53 PM
Format number for time , hh:mm:ss,,,second appears 00 1.image in a table 2.right click 3.menu click format 4.a format column appears OldFatDog Drawing and Graphics 1 06-13-2014 11:19 PM
Change from General Format to number format gbaker Excel 3 08-16-2013 01:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft