+ Reply to Thread
Results 1 to 5 of 5

Possible to add a Floor and Ceiling to existing formula?

  1. #1
    Forum Contributor
    Join Date
    02-12-2018
    Location
    TX
    MS-Off Ver
    MS Office 2019
    Posts
    305

    Possible to add a Floor and Ceiling to existing formula?

    I have four cells with values in them, and then the total in the fifth cell.
    Cell A3 Value is 12
    Cell B3 Value is 29.3
    Cell C3 Value is 34.7
    Cell D3 Value is 10
    Cell E3 Total is 1018.71
    The formula in cell E3 is =SUM(B3*C3)+(A3-D3). I need to add a CEILING of 0.5, and a FLOOR of 1. Not sure how to phrase this. Have attached spreadsheet for clarity. Thanks all for your help.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Possible to add a Floor and Ceiling to existing formula?

    I don't understand.

    The current result is 1018.71. =CEILIING(E3,0.5) would return 1019.0. =FLOOR(E3,1.0) would return 1018.0. =FLOOR(CEILING(E3,0.5),1.0) would return 1019.0. =CEILING(FLOOR(E3,1.0),0.5) would return 1018 (and should always be the same as FLOOR(E3,1.0)).

    From the other thread, I expect you understand the basic syntax and use of the FLOOR() and CEILING() functions, so it seems like this is more about the pre-Excel part of the problem of truly understanding the logic you want behind this rounding problem. Which result is correct, and what is the logic you used to get to that result?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Possible to add a Floor and Ceiling to existing formula?

    I'm reading this as, you want it rounded to the nearest half?

    Please Login or Register  to view this content.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: Possible to add a Floor and Ceiling to existing formula?

    FLOOR and CEILING are actually function names in Excel (used for rounding down/up to a particular increment), so this might be a bit confusing to anyone who reads your thread.

    I'm not really sure what you want to do, though. Your total is 1018.71, but presumably you want this to be shown differently, so can you explain what it is that you want to achieve.

    Pete

  5. #5
    Forum Contributor
    Join Date
    02-12-2018
    Location
    TX
    MS-Off Ver
    MS Office 2019
    Posts
    305

    Re: Possible to add a Floor and Ceiling to existing formula?

    Thanks all for your help. Short answer to your question, I have zero training in any of this any only a moderate understanding. I've been at this less than 6 months and I'm figuring it out as I go. A lot of it makes sense though. In this particular instance, I probably didn't phrase my question appropriately, but the answers I received were super helpful and I was able to use them to help me get a resolution to my problem. So thank you both for your help and apologies for the confusion. I'm working on it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using Floor / Ceiling dynamically
    By Malinor in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-18-2018, 09:43 PM
  2. Replies: 2
    Last Post: 03-27-2017, 09:39 PM
  3. Floor and ceiling functions
    By Parkerlad in forum Excel General
    Replies: 3
    Last Post: 11-03-2011, 08:58 AM
  4. FLOOR and CEILING functions
    By jalba in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2009, 05:44 PM
  5. Something like CEILING or FLOOR
    By gusvenables in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-28-2005, 12:05 AM
  6. [SOLVED] ceiling & floor
    By Bill Ridgeway in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-07-2005, 10:05 AM
  7. ceiling and floor functions
    By JFamilo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2005, 11:13 AM

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