+ Reply to Thread
Results 1 to 12 of 12

Rounding Question

  1. #1
    Registered User
    Join Date
    05-11-2005
    Posts
    5

    Rounding Question

    Heres the short end of what Im trying to do. I am trying to subtract two dates and return the number of months between the two dates. I can get this part. The catch here is that I want the number of months to come back as either whole months or half months. So 1/1/05-2/1/05 = 1 month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run the calc I get numbers like 1.64 and using a round will give me 1.6 whereas I would want this number to come back as 1.5.
    Any ideas?

  2. #2
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  3. #3
    Registered User
    Join Date
    05-11-2005
    Posts
    5
    works great thanks!!!

  4. #4
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  5. #5
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  6. #6
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  7. #7
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  8. #8
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  9. #9
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  10. #10
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  11. #11
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




  12. #12
    N Harkawat
    Guest

    Re: Rounding Question

    =floor(1.64,0.5)
    will reduce 1.64 to 1.5
    so you could enclose your formula as

    =floor(your formula,0.5)

    also take a look at function CEILING to round up your values to nearest 0.5


    "Rweasel6" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Heres the short end of what Im trying to do. I am trying to subtract
    > two dates and return the number of months between the two dates. I can
    > get this part. The catch here is that I want the number of months to
    > come back as either whole months or half months. So 1/1/05-2/1/05 = 1
    > month and 1/1/05-2/15/05 = 1.5 months. My problem is that when I run
    > the calc I get numbers like 1.64 and using a round will give me 1.6
    > whereas I would want this number to come back as 1.5.
    > Any ideas?
    >
    >
    > --
    > Rweasel6
    > ------------------------------------------------------------------------
    > Rweasel6's Profile:
    > http://www.excelforum.com/member.php...o&userid=23251
    > View this thread: http://www.excelforum.com/showthread...hreadid=379078
    >




+ 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