+ Reply to Thread
Results 1 to 4 of 4

how do i operate on the decimal portion of a number

  1. #1
    maintchief
    Guest

    how do i operate on the decimal portion of a number

    I am working on making a worktime calculator to ensure that i know what my
    employer should be entering. We clock in/out using 100ths of an hour
    (x.00-x.99).
    If a day's time (the fraction portion) falls .12 above a quarter hour (.00,
    ..25, .50, .75) it is rounded down to the lower quarter hour. If it is
    ..13-.24 above a quarter hour it is rounded up to the next higher quarter
    hour. I am having problems figuring out how to operate on the decimal
    portion and get the proper result (retaining the hour portion (or increasing
    it by 1) and the new quarter hour portion.


  2. #2
    JE McGimpsey
    Guest

    Re: how do i operate on the decimal portion of a number

    One way:

    =ROUND(A1*4,0)/4

    In article <83A520EF-08E3-42FE-9AA7-F4D8754001E8@microsoft.com>,
    "maintchief" <maintchief@discussions.microsoft.com> wrote:

    > I am working on making a worktime calculator to ensure that i know what my
    > employer should be entering. We clock in/out using 100ths of an hour
    > (x.00-x.99).
    > If a day's time (the fraction portion) falls .12 above a quarter hour (.00,
    > .25, .50, .75) it is rounded down to the lower quarter hour. If it is
    > .13-.24 above a quarter hour it is rounded up to the next higher quarter
    > hour. I am having problems figuring out how to operate on the decimal
    > portion and get the proper result (retaining the hour portion (or increasing
    > it by 1) and the new quarter hour portion.


  3. #3
    maintchief
    Guest

    Re: how do i operate on the decimal portion of a number

    You folks are amazing. Thanks a lot.
    One further question: how do I access the referenced article?


    "JE McGimpsey" wrote:

    > One way:
    >
    > =ROUND(A1*4,0)/4
    >
    > In article <83A520EF-08E3-42FE-9AA7-F4D8754001E8@microsoft.com>,
    > "maintchief" <maintchief@discussions.microsoft.com> wrote:
    >
    > > I am working on making a worktime calculator to ensure that i know what my
    > > employer should be entering. We clock in/out using 100ths of an hour
    > > (x.00-x.99).
    > > If a day's time (the fraction portion) falls .12 above a quarter hour (.00,
    > > .25, .50, .75) it is rounded down to the lower quarter hour. If it is
    > > .13-.24 above a quarter hour it is rounded up to the next higher quarter
    > > hour. I am having problems figuring out how to operate on the decimal
    > > portion and get the proper result (retaining the hour portion (or increasing
    > > it by 1) and the new quarter hour portion.

    >


  4. #4
    George Nicholson
    Guest

    Re: how do i operate on the decimal portion of a number

    >> In article <83A520EF-08E3-42FE-9AA7-F4D8754001E8@microsoft.com>,
    >> "maintchief" <maintchief@discussions.microsoft.com> wrote:


    The "article" in question is your original post.

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "maintchief" <maintchief@discussions.microsoft.com> wrote in message
    news:F324731B-B1A7-46D4-A42D-161CC0C612E7@microsoft.com...
    > You folks are amazing. Thanks a lot.
    > One further question: how do I access the referenced article?
    >
    >
    > "JE McGimpsey" wrote:
    >
    >> One way:
    >>
    >> =ROUND(A1*4,0)/4
    >>
    >> In article <83A520EF-08E3-42FE-9AA7-F4D8754001E8@microsoft.com>,
    >> "maintchief" <maintchief@discussions.microsoft.com> wrote:
    >>
    >> > I am working on making a worktime calculator to ensure that i know what
    >> > my
    >> > employer should be entering. We clock in/out using 100ths of an hour
    >> > (x.00-x.99).
    >> > If a day's time (the fraction portion) falls .12 above a quarter hour
    >> > (.00,
    >> > .25, .50, .75) it is rounded down to the lower quarter hour. If it is
    >> > .13-.24 above a quarter hour it is rounded up to the next higher
    >> > quarter
    >> > hour. I am having problems figuring out how to operate on the decimal
    >> > portion and get the proper result (retaining the hour portion (or
    >> > increasing
    >> > it by 1) and the new quarter hour portion.

    >>




+ 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