+ Reply to Thread
Results 1 to 4 of 4

decimal point in worksheet

  1. #1
    Russ
    Guest

    decimal point in worksheet

    Y'all:

    I have a spreadsheet where I want to display a time as "min:sec". My
    worksheet formula for this is =INT(C2) & ":" & INT((C2-INT(C2))*60)

    No problem. Except that I want it to display like this: "30:03", not
    "30:3". How can I do this?


    e.g.
    Here is what I get:
    Time (minutes) Time (minutes:seconds)
    30.050 30:3

    Here is what I want:
    Time (minutes) Time (minutes:seconds)
    30.050 30:03


    I put the spreadsheet out on my website at
    http://webpages.charter.net/rwpatter.../temp/test.xls

    thanks,
    russ


  2. #2
    JE McGimpsey
    Guest

    Re: decimal point in worksheet

    One way:

    XL calculates times as fractional days, so to get minutes, divide by
    (60*24), and format accordingly:

    =TEXT(C2/1440,"[m]:ss")



    In article <[email protected]>,
    "Russ" <[email protected]> wrote:

    > Y'all:
    >
    > I have a spreadsheet where I want to display a time as "min:sec". My
    > worksheet formula for this is =INT(C2) & ":" & INT((C2-INT(C2))*60)
    >
    > No problem. Except that I want it to display like this: "30:03", not
    > "30:3". How can I do this?
    >
    >
    > e.g.
    > Here is what I get:
    > Time (minutes) Time (minutes:seconds)
    > 30.050 30:3
    >
    > Here is what I want:
    > Time (minutes) Time (minutes:seconds)
    > 30.050 30:03
    >
    >
    > I put the spreadsheet out on my website at
    > http://webpages.charter.net/rwpatter.../temp/test.xls
    >
    > thanks,
    > russ


  3. #3
    Trevor Shuttleworth
    Guest

    Re: decimal point in worksheet

    Russ

    one way:

    =INT(C2) & ":" & TEXT(INT((C2-INT(C2))*60),"00")

    Regards

    Trevor


    "Russ" <[email protected]> wrote in message
    news:[email protected]...
    > Y'all:
    >
    > I have a spreadsheet where I want to display a time as "min:sec". My
    > worksheet formula for this is =INT(C2) & ":" & INT((C2-INT(C2))*60)
    >
    > No problem. Except that I want it to display like this: "30:03", not
    > "30:3". How can I do this?
    >
    >
    > e.g.
    > Here is what I get:
    > Time (minutes) Time (minutes:seconds)
    > 30.050 30:3
    >
    > Here is what I want:
    > Time (minutes) Time (minutes:seconds)
    > 30.050 30:03
    >
    >
    > I put the spreadsheet out on my website at
    > http://webpages.charter.net/rwpatter.../temp/test.xls
    >
    > thanks,
    > russ
    >




  4. #4
    Russ
    Guest

    Re: decimal point in worksheet

    Thank you both for nice solutions. Both work equally well. :-)

    sincerely,
    russ


+ 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