ThisCalculator

Everyday

Excel Insert Colon in Time? Quick Fix

Updated · Standard formula, shown below

Time (h:mm) 2:05 h:mm:ss
Decimal hours
2.08 h
Result
Total seconds
7,500 s
Result
Total minutes
125 min
You entered

Excel Insert Colon in Time? Quick Fix

To insert a colon into a time value in Excel, you can use the TEXT function with a format like =TEXT(A1,"hh:mm") to convert a number or existing time into a colon-formatted time. Alternatively, use Find & Replace to add colons to text strings, or apply a custom number format to display the colon without changing the underlying value.

Formula

The calculator above converts a number of minutes into a time value. The core formula is:

Time (hours:minutes) = Total Minutes ÷ 60

Where:

  • Total Minutes – the input number of minutes (must be non-negative).
  • Time (h:mm) – the result expressed as hours and minutes, e.g., 125 minutes becomes 2:05.
  • Decimal hours – the same duration in hours as a decimal, e.g., 2.08 hours.

Excel stores times as fractions of a day (0 to 1). For example, 6:00 AM is 0.25, and 12:00 PM is 0.5. To convert minutes to a time value in Excel, you can divide the minutes by 1440 (the number of minutes in a day) and then format the cell as h:mm.

Worked Example

Using the default value of 125 minutes:

  1. Divide 125 by 60: 125 ÷ 60 = 2.0833 (decimal hours).
  2. The integer part (2) is the hours.
  3. The remainder (0.0833 × 60 = 5) is the minutes.
  4. Result: 2 hours and 5 minutes, displayed as 2:05.

The calculator gives the same result: the output shows 2:05 as the time, 2.08 as decimal hours, and 7500 seconds.

Why You Might Need to Insert a Colon in a Time

Excel often stores times as plain numbers or text when you import data from other systems. For instance, you might have a column with values like 900 meaning 9:00, or 1430 meaning 14:30. To use these in calculations or to make them readable, you need to insert a colon. There are several common scenarios:

  • Typed times without a colon (e.g., 1230 instead of 12:30).
  • Imported text files where times appear as HHMM or HMM.
  • Data from other software that outputs times as decimal hours (e.g., 8.5 for 8:30).

How to Insert a Colon Using the TEXT Function

The TEXT function converts a number to text in a specified format. To add a colon to a four-digit number like 1230, use:

=TEXT(A1,"00\:00")

This displays 1230 as “12:30�. For a number like 900 (9:00), use =TEXT(A1,"0\:00") to get “9:00�. The backslash escapes the colon so it appears literally.

If your source is already a time value (a decimal fraction), use =TEXT(A1,"hh:mm") to show it as text with a colon. Note that the result is text, not a real time, so you cannot perform time arithmetic on it directly.

Using Find & Replace to Add Colons

If you have a column of text values like 1230, you can use Find & Replace to insert a colon:

  1. Select the range of cells.
  2. Press Ctrl+H to open Find & Replace.
  3. In “Find what�, enter ?? (two question marks) – this matches any two characters.
  4. In “Replace with�, enter ^&\: (the caret ampersand inserts the matched text, then the colon).
  5. Click “Replace All�.

This works for four-digit numbers, turning 1230 into 12:30. For three-digit numbers (e.g., 900), you would need a different approach because the pattern ?? matches the first two digits, leaving the last one outside the replacement. A safer method is to use a formula.

Custom Number Formats to Display Colons Without Changing Data

If you want to keep the underlying value as a number (e.g., 1230) but display it as 12:30, you can apply a custom number format:

  1. Right-click the cell and choose “Format Cells�.
  2. Go to the “Number� tab, select “Custom�.
  3. In the “Type� box, enter 00\:00.
  4. Click OK.

Now the cell shows 12:30, but the actual value remains 1230. This is useful when you need to keep the original data intact for other calculations. However, you cannot use this displayed time in time-based functions like SUM or AVERAGE because Excel still sees the number 1230, not a time.

Converting Text to a Real Time Value

Often you need a true time value that Excel can use in calculations. To convert a text string like “12:30� to a real time, use the TIMEVALUE function:

=TIMEVALUE("12:30")

This returns a decimal fraction (0.520833) that you can format as h:mm. If your text is in cell A1, use =TIMEVALUE(A1). For numbers like 1230, first convert to text with =TEXT(A1,"00\:00"), then wrap with TIMEVALUE:

=TIMEVALUE(TEXT(A1,"00\:00"))

Alternatively, you can use the REPLACE function to insert a colon at a specific position. For a four-digit number in A1, =REPLACE(A1,3,0,":") inserts a colon before the third character, giving “12:30�. For a three-digit number, use =REPLACE(A1,2,0,":") to get “9:00�.

Common Mistakes and How to Avoid Them

  • Using TEXT when you need a real time – TEXT returns a string, so you cannot subtract or sum it. Use TIMEVALUE instead.
  • Forgetting the backslash in custom formats – In a custom format, you must escape the colon with a backslash (\:) or wrap it in quotes ("") so Excel doesn’t interpret it as a time separator.
  • Assuming Find & Replace works on numbers – If your cells contain numbers, Find & Replace may not work as expected because Excel treats numeric values differently. Convert to text first or use a formula.
  • Not adjusting for 24-hour vs 12-hour display – When you format a time, Excel shows 24-hour by default. To show AM/PM, use h:mm AM/PM.

Frequently Asked Questions

How do I insert a colon in Excel without changing the number?

Apply a custom number format like 00\:00 to the cell. This displays the number with a colon but leaves the underlying value unchanged. For example, 1230 shows as 12:30, but the cell still contains 1230.

Can I convert a column of numbers like 900 to 9:00?

Yes. Use the formula =TIMEVALUE(TEXT(A1,"0\:00")) if the number is in A1. This converts 900 to 9:00 as a real time. For numbers with four digits, use "00\:00".

Why does my time show as a decimal like 0.52?

Excel stores times as fractions of a day. 0.52 represents 12:28 PM (roughly). To display it as a time, select the cell, go to Format Cells > Number > Time, and choose a format like h:mm.

How do I add a colon to every cell in a column at once?

Select the column, then use the Find & Replace method with ?? and ^&\: for four-digit numbers. For variable-length numbers, use a formula in a helper column, then copy and paste as values.

Does the TEXT function work with time values?

Yes. If A1 contains a real time, =TEXT(A1,"hh:mm") returns the time as text with a colon. This is useful for concatenating with other text, but the result is not a time value.

What if my times include seconds, like 123045?

For six-digit numbers representing HHMMSS, use =TIMEVALUE(TEXT(A1,"00\:00\:00")). This converts 123045 to 12:30:45. The same custom format 00\:00\:00 will display it correctly.

Related

Formula used
in t | Total minutes | min | 125 | 0
out time | Time (h:mm) | - | t / 60 | time
out hours | Decimal hours | h | t / 60 | 2
out seconds | Total seconds | s | t * 60 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.