+ Reply to Thread
Results 1 to 9 of 9

#VALUE when converting Time to whole number and decimal

  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    #VALUE when converting Time to whole number and decimal

    Hi guys,

    It was a while since I have visited this forum. I have learned a lot from here specially to the kind and helpful people and moderators. Anyway, I am presented with time data which are mix with seconds and time. Like column A1-A5 would contain 59 seconds, 15 seconds, 25 seconds, 1:05 (1 minute and 5 seconds) and 1:12:45 (1 hour, 12 minutes and 45 seconds)....Now the challenge here is that when I add all these time data and convert all of them in seconds like =SUM(A1:A5)*86400...I get a #VALUE error message? How can I get the sum and convert the total result into whole number in seconds, minutes and hours and also get them in decimal value? I hope I don't sound confusing?? Any idea guys how to accomplish this?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE when converting Time to whole number and decimal

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: #VALUE when converting Time to whole number and decimal

    Quote Originally Posted by martindwilson View Post
    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Hi Martin,

    Thanks for replying...Here is the attached sample workbook. Thanks in advance.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: #VALUE when converting Time to whole number and decimal

    unfortunately 1:05 is 1 hour 5 minutes it needs to be 00:01:05
    otherwise you could use array entered
    =SUM(IF(A2:A6<1,A2:A6*86400,A2:A6))
    Last edited by martindwilson; 09-07-2013 at 01:34 PM.

  5. #5
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: #VALUE when converting Time to whole number and decimal

    Quote Originally Posted by martindwilson View Post
    unfortunately 1:05 is 1 hour 5 minutes it needs to be 00:01:05
    otherwise you could use array entered
    =SUM(IF(A2:A6<1,A2:A6*86400,A2:A6))
    Hi again,

    Tried the formula provided however I still received the #value error message. I am guessing that it has something to do with the mixed data presented which are in whole number and time format. Please see Sheet 2 of attached file. Thanks.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: #VALUE when converting Time to whole number and decimal

    Im sorry but the server went down when posting my reply...just want to make sure that my response appears on the recent post...reposting only and still needs a reply ...thanks

  7. #7
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: #VALUE when converting Time to whole number and decimal

    What is 1:4 meant to be? 1:40 or 1:04?
    Remember what the dormouse said
    Feed your head

  8. #8
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: #VALUE when converting Time to whole number and decimal

    Quote Originally Posted by romperstomper View Post
    What is 1:4 meant to be? 1:40 or 1:04?
    Hi there,

    1:4 means 1 minute and 4 seconds...I know this is an incorrect value in excel but this was how the data is presented on the report that I am working with. That's why I am having this challenge...The data are extracted from a website thus they have different time format appearance...

  9. #9
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: #VALUE when converting Time to whole number and decimal

    Try selecting your data, then press Ctrl+H, click in the Find box and hold the Alt key while typing 0160 on the number keypad, leave the Replace box blank and press Replace All. That should convert your data to numbers/times. You can then use Martin's array formula:
    =SUM(IF(B5:B22<1,B5:B22*86400,B5:B22))
    which must be entered using Ctrl+Shift+Enter rather than just Enter.

  10. #10
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Re: #VALUE when converting Time to whole number and decimal

    Quote Originally Posted by romperstomper View Post
    Try selecting your data, then press Ctrl+H, click in the Find box and hold the Alt key while typing 0160 on the number keypad, leave the Replace box blank and press Replace All. That should convert your data to numbers/times. You can then use Martin's array formula:
    =SUM(IF(B5:B22<1,B5:B22*86400,B5:B22))
    which must be entered using Ctrl+Shift+Enter rather than just Enter.
    Hi Romp,

    Ok..tried your suggestion and yeah it worked but is there anyway that I don't have to do those procedures...I mean that ALT 0160 something? Is it possible to automate such that when I paste it on excel it automatically converts the data into time? also how do I convert those seconds into minutes (whole number and decimal format)

  11. #11
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Smile Re: #VALUE when converting Time to whole number and decimal

    Quote Originally Posted by stoey View Post
    Hi Romp,

    Ok..tried your suggestion and yeah it worked but is there anyway that I don't have to do those procedures...I mean that ALT 0160 something? Is it possible to automate such that when I paste it on excel it automatically converts the data into time? also how do I convert those seconds into minutes (whole number and decimal format)
    and by the way the formula given by martin? which is =SUM(IF(A2:A6<1,A2:A6*86400,A2:A6))....i changed the 86400 to 1440 to get the total seconds...still up for the previous issue...how can I automate in such that the data that I will paste which were extracted from the web be converted to time format without having to do the alt0160 thingy?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel 2007 : Converting decimal to time
    By VinceValdez12 in forum Excel General
    Replies: 4
    Last Post: 11-23-2011, 03:24 PM
  2. Converting Time to a decimal and ...
    By zen3k in forum Excel General
    Replies: 5
    Last Post: 07-20-2009, 03:32 PM
  3. Converting military time to decimal time not rounding correctly
    By Sean Anderson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-23-2008, 09:12 PM
  4. Converting a decimal number into time
    By M.A.Tyler in forum Excel General
    Replies: 7
    Last Post: 05-25-2006, 11:45 PM
  5. Replies: 3
    Last Post: 03-18-2006, 02:25 PM

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