Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Using an Input Mask.
by Allen Wyatt
(last updated February 10, 2018)
When inputting time into a cell, it is easy to enter digits—that's what the numeric keypad is for, after all. What can really slow you down is the necessity to enter other characters, particularly ones that require the use of the Shift key. For instance, if you are entering times, it is easy to enter 230 for 2:30, but it is a pain to slow down by entering the colon.
Thus, you may wonder if there is a way to set up an input mask that will add the colon automatically. The good news is yes, there is. The bad news is no, there isn't. Sound confusing? Let me explain...
You can set up a custom format that will display your time in any format you want. For instance, you could use the following steps:
Figure 1. The Number tab of the Format Cells dialog box.
You can now enter your times using just digits. The problem (and this is the bad news) is that the cell doesn't really contain a time. If you enter 230 (for 2:30), it doesn't contain 2:30 as a time—it contains two hundred and thirty. Thus, you can't use the contents of the cell directly in time calculations.
To overcome this, you can use another column to show the entered digits converted into a time. All you need to do is use a formula to do the conversions. For instance, if the time you entered was in cell A3, you could use the following formula in a different cell to do the conversion:
Format the cell that contains the above formula so it displays one of the various time formats, and you are all set.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12550) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Using an Input Mask.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Need to make sure that information entered in a worksheet is always in a given unit of measurement? It's not as easy of a ...Discover More
When you work with imported or pasted data in an Excel worksheet, you may see some strange looking characters at times. ...Discover More
Defined names can be a great boon when working in a worksheet. Usually names are available throughout an entire workbook, ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.