+ Reply to Thread
Results 1 to 8 of 8

Time to Decimal problems!

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    6

    Time to Decimal problems!

    Hi Guys,

    Long time reader and viewer, first time poster.

    Just exported some data from software at work into excel.

    It comes with a column that reads "Downtime" and it has all the times that each job takes. eg 2:31 is two hours and thirty one minutes.

    There are some jobs that take over 80 hours and they come up as say 65:34 which is 65 hours and thirty four minutes.

    Convert the "downtime" cells to [h]:mm and in a new column multiply by 24 to get the decimal, and change the format of the new column to decimal? eg 1:30 will become 1.5.

    When I do this, I get #VALUE! come up.

    When I manually delete one value in the "downtime" column, the #VALUE! dissapears and the decimal value appears. Theres around.... 7000 rows of data here...


    Even though I've selected the entire column and converted to custom [h]:mm, it just keeps repeating the #VALUE! error.

    I have wasted 3.5 hours of life over this lol.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Time to Decimal problems!

    Are you sure the values aren't text that appear as time?

    Can you upload a sample workbook?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Time to Decimal problems!

    When they are imported, they come as "general".

    And I cant upload a sample at the moment, my laptop is secure and needs a workplace connection to use the internet.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Time to Decimal problems!

    What does the ISNUMBER function return when you try it on one of the values?

  5. #5
    Registered User
    Join Date
    01-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Time to Decimal problems!

    Comes up as False...

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: Time to Decimal problems!

    Sounds like you have several problems.
    1.
    There are some jobs that take over 80 hours and they come up as say 65:34 which is 65 hours and thirty four minutes.
    Why? I'd need to see the data.
    2. Converting to a decimal. Norie is probably correct. If your initial data is in col A, look for spaces. (click on the cell and move your cursor in the formula bar in front of and behind the "number" to see if there are blank spaces there. Try = TRIM(A1)*24.
    Any of that help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Registered User
    Join Date
    01-04-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Time to Decimal problems!

    Yes! As soon as I saw it wasnt a number... I started thinking.

    Trimming it, brings up the proper value.

    I see what to do now!


    Thank you Gentlemen.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Time to Decimal problems!

    That means the values aren't being recognised as 'real' times.

    You need to convert them to be able to do any further calculations.

    If there are leading/trailing spaces you can do a find and replace to get rid of them.

+ 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