Sorting Apples pt. 3

lotien15

New Member
Joined
Apr 5, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi,

I'm trying to see if its possible to do in excel or to build a macro for the following situation:

We have multiple types of apples (Fuji, Red, Gala, Golden, HoneyCrisp, and Green). All apples are each uniquely barcoded that are evenly distributed into 6 baskets. When it comes to uneven numbers divisible by 6, we add back the apples into one of the other baskets (in others words, would restart the count OR basket 1 & 2 would get two apples from Red); can't have part of an apple. -- We want to keep the types of apples evenly distributed among the baskets.

After grouping the apples into their respective baskets, is there a way to evenly redistribute the apples based on the number of baskets while keeping the types of apples evenly distributed; in this case 6. Since we have a total count of 45 apples, there should be 7 apples in each basket; with the exception of 3 baskets having 8 apples? As you can see below in the counts of each baskets, we have 11 apples that are in basket 1 and each basket is suppose to have about 7.
1649712001705.png


We can move the Fuji apples to Basket 4, 5, 6 -- like so instead of starting at 1, 2, 3:
1649712752043.png




1649712932844.png
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top