+ Reply to Thread
Results 1 to 4 of 4

Rounding up or down only so that the sum will not go over

  1. #1
    Registered User
    Join Date
    07-11-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Rounding up or down only so that the sum will not go over

    Hi.. need help on my spreadsheet below. Basically, I will give 10 units of fruits.. after a series of fair and equitable distribution, it has to give 1.5 apples, 2.75 oranges and 2.75 grapes to 1 person.. since we have to round the results, since there is no such thing as 1.5 apple (unless you cut it. ), using the ROUND function will increase the total sum to 11 which is not right. I wanted to only round the numer UP or DOWN so that my total sum will not exceed the limit of 10. Some numbers work.. but for this scenario, I will go over my limit of 10.

    Thanks in advance for your help.

    I attached an image file for better viewing...
    Needhelp.jpg
    Scenario 1
    Unit Rounded Wanted
    Apples 1.5 2 1 since apple has the lowes remainder
    Oranges 2.75 3 3
    Grapes 5.75 6 6
    Sum 10 11 10

    Scenario 2
    Unit Rounded Wanted
    Apples 1.3333 1 1
    Oranges 2.3333 2 2
    Grapes 4.3334 4 5 since grapes has the biggest remainder
    Sum 8 7 8


    Attachment 249678

  2. #2
    Forum Contributor
    Join Date
    06-26-2013
    Location
    LAX
    MS-Off Ver
    Excel 2007,Excel 2010
    Posts
    363

    Re: Rounding up or down only so that the sum will not go over

    Hi,

    Welcome to the forum. Always please attach a excel sheet with the data instead of images.

    See if the below formula works for you, else get back here again

    In d3, paste this formula and drag down. Adjust the range accordingly

    =IF(SMALL($C$3:$C$5,1)=C3,C3-1,C3)

    In d10, paste this formula and drag down. Adjust the range accordingly
    =IF(LARGE($C$10:$C$12,1)=C10,C10+1,C10)

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Rounding up or down only so that the sum will not go over

    Pl see the attached file. Array formulas are used.(After pasting formula press Ctrl+Shift+Enter keys together.)
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-11-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Rounding up or down only so that the sum will not go over

    Thanks for your quick replies. Very much appreciated. I tried both solutions and it work for certain scenarios..but the problem is I don't know without looking manually if my new total because of rounding matched (most of the time) or it went up or down. I have attached a spreadsheet to depict what I meant. Sorry for providing my previous example in jpg. Again, thanks in advance for your help.

    Best Regards,
    CaptJun
    Attached Files Attached Files

+ 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