+ Reply to Thread
Results 1 to 7 of 7

Rounding numbers to whole number need equal original

  1. #1
    Registered User
    Join Date
    06-21-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    Rounding numbers to whole number need equal original

    Hello,

    Packing to ship 11 cases and the breakdown of boxes is red 20%, assorted 68% and 13% rainbow.

    Total Cases Ordered 11.00
    Red 2.20
    Assorted 7.43
    Rainbow 1.38
    Special Order 0.00

    We can not ship decimal boxes, It has to be a whole number.
    Since all the decimals are less than .5 they all get rounded down and you got a total of 10 cases showing. 2 red, 7 assorted, 1 rainbow =10

    (all above .5 will round up for 13 total)

    I need the three categories red, assorted, and rainbow to be whole numbers and always equal my total cases ordered.

    Thanks,

    Paul 3
    Last edited by Papeters111; 11-19-2014 at 06:02 PM. Reason: Solved

  2. #2
    Registered User
    Join Date
    06-21-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Rounding numbers to whole number need equal original

    It does not really matter which one gets rounded up but preferably the one with the highest decimal, in this case assorted.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Rounding numbers to whole number need equal original

    I haven't tested this extensively, but with the data you submitted:
    With numbers in column B this formula in column C.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then this formula for the total:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I don't know how it will work for the rest of your data.

  4. #4
    Registered User
    Join Date
    06-21-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Rounding numbers to whole number need equal original

    Tried it and no luck but I see what the thought was there.

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

    Re: Rounding numbers to whole number need equal original

    I would probably do something like:

    assorted=ROUNDUP(total*0.68,0)
    red=ROUNDDOWN(total*0.20,0)
    rainbow=total-assorted-red
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    06-21-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Rounding numbers to whole number need equal original

    Works, will use this.

    Thanks,

    P3

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

    Re: Rounding numbers to whole number need equal original

    Another way (two examples):

    Row\Col
    A
    B
    C
    D
    1
    Total
    2
    11
    C2: =ROUND(SUM(B4:B6), 0)
    3
    Ordered
    Ship
    4
    Red
    2.20
    2
    C4: =IF(B4=0, 0, ROUND(B4 * (C$2 - SUM(C$3:C3) ) / ($C$2 - SUM(B$3:B3)), 0) )
    5
    Assorted
    7.43
    8
    6
    Rainbow
    1.38
    1
    7
    8
    9
    Total
    10
    13
    C10: =ROUND(SUM(B12:B14), 0)
    11
    Ordered
    Ship
    12
    Red
    1.28
    1
    C12: =IF(B12=0, 0, ROUND(B12 * (C$10 - SUM(C$11:C11) ) / ($C$10 - SUM(B$11:B11)), 0) )
    13
    Assorted
    1.51
    2
    14
    Rainbow
    9.76
    10
    Entia non sunt multiplicanda sine necessitate

+ 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. Replies: 1
    Last Post: 09-03-2014, 01:52 AM
  2. Replies: 1
    Last Post: 06-26-2013, 02:22 PM
  3. Multiplying odd numbers by percentages to total to original number
    By leepea42 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2013, 02:22 AM
  4. [SOLVED] IF statment to verify a number is equal to or between two other numbers
    By timothyg in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2012, 09:14 AM
  5. Finding what numbers equal another number
    By all2sober in forum Excel General
    Replies: 1
    Last Post: 06-26-2008, 01:54 PM

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