VBA allocation using condtional if


I want to use VBA to solove the following problem.

I have 3 teams. Each team has amount of players. Team 1 is the firs to allocat players between the Tournament and Groups.

I have several consraints:

The first team to allocate is team 1 than team 2 and than team 3.

the allocation between the groups is according to the preference.

The first allocation is to Tournament 1. However there is maximun players for each Tournament. If Tournament is full you move to the next Tournament.

After team 1 finish to allocate than team 2 and finally team 3

Many Thanks

  please find attached spreadsheet



Copy/pasting the spreadsheet doesn't work well; please upload a sample spreadsheet. Otherwise, I have no idea how exactly you want to do this. If you don't have a starting idea yet of what to do, please look for a sample template online and then we can help you modify it from there.
don (rep: 1745) Aug 25, '17 at 5:10 am
sure i added spreadsheet

the upper tabe are the consraints and the lower table is the desired allocation.
i am interesting to replace the question marks with the results

Many Many thanks
d1234 Aug 25, '17 at 10:00 am
I'm still lost. What is supposed to be in place of the question marks? I don't understand where the "max" points come from. This problem doesn't make sense to me in the way that you are proposing it.
don (rep: 1745) Sep 1, '17 at 7:38 am
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login