Closed Thread
Results 1 to 3 of 3

how do you divide the average of a number into 3 different cells.

  1. #1
    Shaun
    Guest

    how do you divide the average of a number into 3 different cells.

    i am trying to do a stock and order for work. i have to divide the amount of
    sales by the quantity of units in a case to come up with ( cases required to
    order). i have done that but i need to average that total into to three
    cells. e.g 12 = 4 4 4, 11 = 4 4 3

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333

    Lightbulb

    Assuming you want the last column to be the "catch" column, that is it will either be higher or lower than the other two columns by one if the number is not divisible by three evenly you can try the following:

    Please Login or Register  to view this content.
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    SteveW
    Guest

    Re: how do you divide the average of a number into 3 different cells.

    On Tue, 25 Jul 2006 21:44:02 +0100, Shaun =

    <[email protected]> wrote:

    > i am trying to do a stock and order for work. i have to divide the =


    > amount of
    > sales by the quantity of units in a case to come up with ( cases =


    > required to
    > order). i have done that but i need to average that total into to thre=

    e
    > cells. e.g 12 =3D 4 4 4, 11 =3D 4 4 3


    don't use the word average - confusing.

    You want to split or spread

    if A5 =3D 12
    then B5 =3D roundup(a5/3,0)
    c5 =3D roundup(a5/3,0)
    d5 =3D a5-b5-c5

    This gives odd result for 10, ie 4,4,2
    and for 9 result is 3,3,3

    If this is acceptable
    otherwise
    change c5 =3D roundup((a5-b5)/2,0)
    not 10 produces 4,3,3



    -- =

    Steve (3)

Closed 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