+ Reply to Thread
Results 1 to 9 of 9

Integer and time conversion

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    273

    Integer and time conversion

    Hello All
    Very excited to have found this user group. Hoping for some help with this issue I have been unable to figure out. Unfortunetly this data I am extracting from another program is not very user friendly.
    1. I have a Simple # in a cell i.e. 6, and I am wishing to convert that # into 6 minutes or 143 into 143 minutes or 2 hours and 23 minutes etc.
    2. I would them like to add that 6 or 143 minutes to a specific time i.e 1:52 PM or 13:52

    I have attached a sample of the spreadsheet if it helps

    I am sure I am missing something in either the format or some simple formula,but cant quite nail it down. Any help would be greatly appreciated

    Thanks in advance

    Ron

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Integer and time conversion

    Hi Ron and welcome to the forum

    I dont think your file attached properly?

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    273

    Re: Integer and time conversion

    Thanks for the heads up F Dibbins. Hopefully I have attached the file properly
    Thank you again
    Ron
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Integer and time conversion

    self-deleted duplicate post
    Last edited by FDibbins; 01-28-2013 at 01:17 PM.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,419

    Re: Integer and time conversion

    I would guess that the problem comes from not understanding how Excel works with date/time values. From http://office.microsoft.com/en-us/ex...240.aspx?CTT=1
    Microsoft Excel stores dates as sequential numbers that are called serial values. For example, in Microsoft Excel for Windows, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900. Excel stores times as decimal fractions because time is considered a portion of a day. The decimal number is a value ranging from 0 (zero) to 0.99999999, representing the times from 0:00:00 (12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.).

    Because dates and times are values, they can be added, subtracted, and included in other calculations. You can view a date as a serial value and a time as a decimal fraction by changing the format of the cell that contains the date or time to General format.
    So, assuming the 13:52 is a date/time serial value, the key to adding a value that is "# of minutes" is to convert that number into "fraction of a day." Then it should be easy enough to add the two date/time serials together. (comma delimited)
    # of minutes,base time,fraction of a day,added to time
    6,13:52,=A2/60/24,=C2+B2
    format column D as time if you want it to show up as 13:58
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

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

    Re: Integer and time conversion

    If you want to add the minutes in column G to the time in column I you can use this formula.
    Formula: copy to clipboard

    =I2+TIME(0,G2,0)
    If posting code please use code tags, see here.

  7. #7
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    273

    Re: Integer and time conversion

    Thanks so much Norie....Works perfectly...
    Would you be so kind as to tell me what that formula means so I have a better understanding?
    Thanks again
    Ron

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

    Re: Integer and time conversion

    Ron

    The TIME(h, m, s) worksheet function returns the time based on the (h)ours, (m)inutes and (s)econds you pass to it.

    In this case we have no hours or seconds to just need to pass the minutes from G2.

    Once we have the time we just add it.
    Last edited by Norie; 01-28-2013 at 03:53 PM.

  9. #9
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    273

    Re: Integer and time conversion

    Thanks again to all..Hope I am able to contribute someday

+ 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