+ Reply to Thread
Results 1 to 2 of 2

Sorting formula

Hybrid View

callmeyewgor Sorting formula 09-13-2022, 10:57 PM
JeteMc Re: Sorting formula 09-15-2022, 07:12 PM
  1. #1
    Registered User
    Join Date
    09-13-2022
    Location
    Malaysia
    MS-Off Ver
    MS 365
    Posts
    11

    Sorting formula

    Working on this project, i have issue to formulate this..need help, let's say
    Item A has total of 20.
    Item B has total of 25.

    Point Consideration
    1. These two items A&B can be put inside a same big box
    2. One big box is filled with 2 small boxes
    3. Each small box only can fits with 8 quantities. So total 16 quantities in a big box.
    4. However, Item A and Item B cannot fill in the same small box, meaning if small box A has filled 6 quantities, then remaining 2 cannot be filled with item B
    5. Scenario: small box with item A is filled with existing solution, small box with item B is the additional in next solution.

    I have done the solution for Item A, but i couldn't solve for the new add in Item B. In this solution i need to expect:

    Box 1: 16 item A
    Box 2: 4 Item A, 8 Item B
    Box 3: 16 Item B
    Box 4: 1 Item B

    You may refer the formula below that i used to output for Item A alone

    Box 1 formula: =IF(25/(2*8)>=1,2*8,MOD(25,(2*8)))
    Box 2 formula onwards: =IF((25-SUM(G$40:G40))/(2*8)>=1,2*8,MOD(25-SUM(G$40:G40),(2*8)))

    Screenshot.PNG
    Last edited by callmeyewgor; 09-13-2022 at 11:15 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,984

    Re: Sorting formula

    Hello callmeyewgor and Welcome to Excel Forum.
    Perhaps this will help:
    1. Set up the data so that the items and totals are in rows 1:2
    2. Big box #'s in column A are populated using: ="Big Box "&ROUNDUP(ROWS(A$4:A4)/2,0)
    3. Small box #'s in column B are populated by typing Sm. Box 1 in cell B4 and then double clicking the fill handle to copy down
    4. The number of items that can be placed into each small box are calculated using: =IF(C4>0,0,MIN(D$2-SUM(D$3:D3),8))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] I require sorting formula in excel sheet with complex sorting.
    By kaminanirav in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2015, 08:16 AM
  2. Implement sorting text cells using array formula in the current formula.
    By archangel9999 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2014, 06:42 AM
  3. Sorting with formula
    By A_K in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2013, 04:17 PM
  4. Need formula instead of sorting
    By JK1234 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-06-2010, 04:08 PM
  5. Sorting and formula
    By vasquez in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-26-2009, 03:05 PM
  6. Sorting formula?
    By crestars in forum Excel General
    Replies: 3
    Last Post: 03-08-2006, 04:19 PM

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