To solve the G and F issue, I have a list that tallies the "selected" players, and that list has a min/max of each. So in this example I need 1 PG, 1 SG, and 1 G. So I have a PG column with a min of 1 and a max of 2, a SG column with a min of 1 and a max of 2, and a G column, which adds PG/SG together that has a min of 3 and a max of 3. Then part of the solver criteria is all the min/max must match.

I have split the first column into POS1 and POS2 to separate the two possible positions, but I can't figure out how to include both in the solver function. For a player like Kevin Love, I want the solver to take into account that he can be placed in either the PF, F, or C spots.

Can you upload an example of what the ideal result is? And also update your table with the splits that you mentioned in the first column? And give some details around the solver you are using currently? That will help answerers direct their efforts.
–
guitarthrowerJan 9 '14 at 16:45

1

thanks for the feedback. I updated the original question...does that seem better?
–
fullOfQuestionsJan 9 '14 at 17:44

1 Answer
1

Your question is still a bit vague because your Salary Cap is $50,000 but you show $63,000 of players selected.

Assumptions:
1. You want 5 players since that is the number of players floor and the only way to get a team consisting of your player-list below $50,000. This is probably Fantasy hoops and you want 7 or 8, but the solution should still work for 8 players with either a broader list of options and lower salaries.
2. I'll also assume that there is little-no VBA in here since you didn't provide any - or at least none of that needs to be adjusted.

My solution (which is still in testing) is to throw/cast (or VBA equivalent) for Pos1 and Pos2 to a text of position number (i.e., 1 = PG, 2=SG, etc.).

Next, =concatenate(Pos1, Pos2) so that a PG is an 11, a PG/SG is a 12, etc. ("G" is also an 11 in this scenario which might put a glitch in my logic).

So I didn't user your exact solution, but your response sparked a simple answer for me. I just left the listed position as PG/SG, SG/SF, etc and added new Min/Max numbers for them. So in addition to the min/max for PG/SG/SF/PF/C, I have a min on the PG/SG of 0 and a max of 5 (the roster requirements allow up to 5 - PG, SG, G, and 2 "any player" spots). Works like a charm! Thanks for your respnse, it helped me figure it out!
–
fullOfQuestionsJan 9 '14 at 20:43

Glad to be of service. Your question sparked my inquiry into "Solver" which I have not used previously.
–
SammyBJan 9 '14 at 20:46