+ Reply to Thread
Results 1 to 2 of 2

Adding lead zeros

  1. #1
    Registered User
    Join Date
    01-07-2013
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2003
    Posts
    1

    Adding lead zeros

    Original question:
    Hello...

    I'm pasting data from an external source into Excel. The data is in hh:mm:ss format. However, when the source data has zero hours it only displays minutes and seconds preceded by a colon. For example, 5 cells of data in a column might look like this:

    :29:28
    :31:50
    1:15:17
    :05:47
    1:19:36

    I need to run simple calculations on these times, but the cells without an hours value paste into Excel as text format. What are some ways to add a zero before the colon in Excel?

    Great Answer:
    try
    =(0&B2)+0 cell formated hh:mm:sss

    My question: How do I prevent #VALUE when the cell is not missing data in front of the colon?

    Example:
    Works for :36:25
    But, I get #VALUE for: 1:36:25

    Thanks!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Adding lead zeros to time

    Works fine for me either way.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1