+ Reply to Thread
Results 1 to 6 of 6

FLOOR and CEILING functions

  1. #1
    Registered User
    Join Date
    09-18-2009
    Location
    Trinidad
    MS-Off Ver
    Excel 2007
    Posts
    64

    FLOOR and CEILING functions

    Say i got a figure 9.9218. If written "=floor(9.9218,0.0625)", the result i would get is 9.875. However, if the formula was written with the CEILING function, I would get 9.9375.

    Now here's the fun part. Is it possible to combine the FLOOR and CEILING function codes into one complete function, where it could determine whether 9.9218 is closer to 9.9375 than 9.875?

    The following was taken from my decimal equivalent chart, at spaces of .0156:
    .875
    .8906
    .9062
    .9218
    .9375

    *As seen here, .9218 is closer to .9375

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: FLOOR and CEILING functions

    =mround(a1, 1/16) -- requires the analysis toolpak.

    Or =round(a1*16, 0)/16
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-18-2009
    Location
    Trinidad
    MS-Off Ver
    Excel 2007
    Posts
    64

    Re: FLOOR and CEILING functions

    ok i understand how that will work with a single cell.

    Now say you have a formula in a cell eg:G5-4.375-4.1875. how can i join the MROUND formula to this?
    Last edited by jalba; 10-09-2009 at 10:26 AM. Reason: wron question asked

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: FLOOR and CEILING functions

    =round(9.9218*16, 0)/16

  5. #5
    Registered User
    Join Date
    09-18-2009
    Location
    Trinidad
    MS-Off Ver
    Excel 2007
    Posts
    64

    Re: FLOOR and CEILING functions

    ok!!! neva mind!!! i understand now!!!!
    some good maths there boy!!!!
    thanks "shg"!!!

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: FLOOR and CEILING functions

    A mere bagatelle, my dear Jalba, but thank you for that Trinidad thank you.


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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