There are some real genius contributors on this site, and I hope one of them will give you an elegant solution.
Perhaps my proposal, modeled on the FRUIT ASGN (TACHYONSTIGGY) sheet, will help until then.
1. I added a column on the Fruit Avail sheet that displays the team number using: =MID(D2,6,3)+0
2. I put the following into AF2:AG10 to show the next teams that could pick a particular fruit:
3. I put the following into AH2:AH10 to show the team assigned a fruit that is being over picked: =IF($C2< $AE2,"TEAM "&AGGREGATE(14,6,MID($D$1:$AD$1,6,3)/($D2:$AD2>0),1),"")
4. I populated a new pick range in AI2:BI10 using: =SUM(D2,IF(OR($AF2=AI$1,$AG2=AI$1),1),IF($AH2=AI$1,-1))
Note that the columns could be added to AF2:AG10 or AH2:AH10 if you find the values in column AE are off by more than one or two.
Let us know if you have any questions.
Bookmarks