跳到主要內容

如何在Excel中以毫秒顯示時間?

例如,記錄的時間包含毫秒,例如10:33:50.235。 當我將此時間輸入Excel中的單元格時,時間顯示為33:50.2。 更改為時間格式後,時間顯示為10:33:50 AM,毫秒消失。 有什麼辦法可以在Excel中正常顯示剩餘毫秒的時間? 是的,以下方法將幫助您輕鬆解決它。

通過Excel中的“設置單元格格式”功能以毫秒為單位顯示時間


通過Excel中的“設置單元格格式”功能以毫秒為單位顯示時間

此方法將引導您創建自定義時間格式,以在Excel中以毫秒為單位顯示時間。 請執行以下操作:

1。 選擇您要顯示的時間單元(以毫秒為單位),右鍵單擊並選擇 單元格格式 從右鍵單擊菜單中。 看截圖:

2。 在打開的“設置單元格格式”對話框中,轉到 聯繫電話 標籤,單擊以突出顯示 習俗 ,在 類別 框,然後鍵入格式代碼 hh:mm:ss.000類別 框。

3。 點擊 OK 按鈕。 然後您將看到毫秒顯示的時間,如下所示的屏幕截圖:

提示:將格式化的時間另存為“自動文本”輸入,以後再使用其格式 容易
通常,我們可以通過在Excel的“設置單元格格式”對話框中添加自定義格式代碼來為單元格應用自定義格式。 但是,此自定義格式代碼僅保存在該工作簿中,並且我們無法直接在其他工作簿中應用該自定義格式。 Kutools for Excel的 自動文本 實用程序使我們能夠將格式化的數據/單元格保存為自動文本條目,以便我們可以將其自定義格式直接複製到任何工作簿的其他範圍。


廣告自動文字格式時間


演示:在Excel中以毫秒為單位顯示時間


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hallo,

ich brauch die Uhrzeit in Millisekunden als statischen Wert. Excel gibt mit der Tastenkombination (command + shift + Semikolon) die Uhrzeit statisch aus. Allerdings mit den Werten 00,000 für Sekunden und Millisekunden. Kennt jemand eine Lösung für dieses Problem? Die Eingabe von statischen Zeitwerten müsste relativ schnell geschehen (ca. 100 Werte innerhalb von 30-40 Minuten).

Tino
This comment was minimized by the moderator on the site
Hi there,

As far as I know, you cannot show milliseconds with the shorcut key. You can use the VBA method below:

1. Select the cell where you want to show the time in milliseconds, and then press Ctrl + 1 to open the Format Cells dialog.
2. Select Custom, and copy and paste hh:mm:ss.000 in the Type input box. Then click on OK to close the dialog.
https://www.extendoffice.com/images/stories/comments/ljy-picture/milliseconds.png
3. Press Alt + F11 to open the VBA window, and then click Insert > Module.
4. Copy and paste the following code into the module window.
Sub TimeStamp()
'Update by ExtendOffice 20220902
    ActiveCell.Value = Format(Now, "hh:mm:ss") & Right(Format(Timer, "0.000"), 4)
End Sub

5. Click F5 to run the code.

Hope this could help you 🙂

Amanda
This comment was minimized by the moderator on the site
I need 6 digits of precision, but "hh:mm:ss.000000" throws an error "Microsoft Excel cannot use the number format you typed"
How to I get 6 digits of milliseconds?
This comment was minimized by the moderator on the site
Hi there, instead of formatting the cell as a time, you should format it as text to show more then 3 digits of milliseconds:

1. Select the cell range where you will input thoses times with more then 3 digits of milliseconds.
2. Press Ctrl + 1 to open the Format Cells.
3. On Number tab, select Text in the Category list. Then click OK.
4. Enter the times in these cells.

Amanda
This comment was minimized by the moderator on the site
...but when you go back to edit the number in the formula bar, the milliseconds are gone (as shown in video). That makes editing very difficult.
Our local format is "mm:ss,000" (not using hours in this case). When I enter number "00:40,123" it displays correctly in the cell, but in the fomula bar it shows "00:00:40". If I enter the formula bar and hit enter, the number in the cell then displays "00:40,000" - losing those crucial milliseconds. I have yet to find a reason, or even more important - a solution.
This comment was minimized by the moderator on the site
Something to watch out for: in some locales it won't work if you use this exact solution. In my version you need to use the format "uu:mm:ss,000" (that's a comma instead of a decimal point, and u is for "uren", dutch for hours).
Not sure whether it has to do with windows version, windows language, windows regional settings, used locale or office version.

For those of you who still want to show a decimal instead of a comma (like me), you can use this workaround (if your value is in cell A1)

=SUBSTITUTE(TEXT(A1;"uu:mm:ss,000");",";".")

Or adapt where necessary for your locale.
This comment was minimized by the moderator on the site
Thanks very much for this.
This comment was minimized by the moderator on the site
Thank you for this information. I need to enter times as per a stop watch in minutes, seconds and hundredths eg 1.23.56. I then need to calculate time differences which can be positive or negative. I get an error if negative and it shows #######. Ideally I would like to enter using . rather than : as I have a larger number of times to enter.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations