Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Entering Large Time Values.

Entering Large Time Values

Written by Allen Wyatt (last updated May 10, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


1

If you format a cell for elapsed time (using a custom display format of [h]:mm:ss), then Excel allows you to enter hours, minutes and seconds into that cell. For instance, you could simply enter 129:14:30 to signify 129 hours, 14 minutes, and 30 seconds. You run into a problem, however, if you try to enter very large time values into the cell. When you try to enter time values in excess of 10,000 hours, as in 12721:52:45, then Excel won't parse the entry as a time, but treats it as text.

The interesting thing is that when a cell is formatted for elapsed time using [h]:mm:ss, the cell can easily display elapsed times that have more than 10,000 hours. Thus, you can sum a range of cells to result in a value more than 10,000 hours, but you cannot enter a larger value.

Unfortunately, there seems to be no way around this in Excel. The best solution, however, might be to rethink how the data is entered. After all, 10,000 hours is equal to 416 days and 16 hours—well over a year. You could easily create a column for entering days and use another for partial days. A third column could then use a formula to return the elapsed hours based on the other two columns.

Another solution is to simply not rely on Excel to do the parsing of your input. If you have a huge number of hours to enter (such as 32,315), then you could enter the following in the cell:

=32315/24

Excel maintains what you enter as a formula, but displays the proper number of hours, minutes, and seconds. If you want to get more precise, you can enter a fractional amount that represents the portion of an hour represented by your time. For instance, 37 minutes and 15 seconds is 0.620833 of an hour. Thus, you could enter the hours as follows:

=32315.620833/24

Of course, entering times in this manner can get tedious, particularly when you have calculate the fractional portion of an hour represented by minutes and seconds. To overcome this, you could create a custom function that allows you to enter hours, minutes, and seconds, and returns a value that is easily formatted using the elapsed time format. The following function will do the trick:

Public Function RealBigTime(hr As Double, _
  min As Double, sec As Double) As Double
    Dim hr1 As Double
    Dim min1 As Double
    Dim sec1 As Double

    Application.Volatile
    hr1 = hr / 24
    min1 = min / 24 / 60
    sec1 = sec / 24 / 60 / 60
    RealBigTime = hr1 + min1 + sec1
End Function

After creating the function, enter something like =RealBigTime(32341,30,45) in a cell. The result is a value that can be formatted with the elapsed time format to 32341:30:45.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2038) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Entering Large Time Values.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Inserting a Bullet

Need to place a bullet in the middle of a sentence? There are a couple of easy ways you can do this, as described in this ...

Discover More

Repaginating in a Macro

When creating a macro that extensively processes a document, you may need to periodically force Word to repaginate the ...

Discover More

Changing Text Case

Word provides a built-in shortcut to change the case of a text selection. Understanding how that shortcut works (and the ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (menu)

Accepting Only a Single Digit

Want a quick way to enter a series of single digits into consecutive cells? The best approach is with a macro, and this ...

Discover More

Recording a Data Entry Time

When entering information in a worksheet, it is common to also note a date or time corresponding to the entry. There are ...

Discover More

Entering Data as Thousands

There are many different ways you may need to enter data in a worksheet. For instance, you might want to enter data in ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2018-11-16 06:56:18

Paolo

Hello.

I'm trying to use your model to solve my issue.
I've been working via macro VBA (Excel 2007).
I've a sum of cell in format "[hh]:mm:ss" that often exceed 24 h, returning incoherent outcomes.

Suppose in cell J140, after being applied the following two instructions, I've the undesired result.

cell.Formula = "=SUMIF(A1:A137,A" & foundrow & ",J1:J137)"
cell.NumberFormat = "[hh]:mm:ss"

How can I apply your function in order to have the desired outcome?

Thank's, Paul


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.