Select cells with highest sum, given a cost constraint (ncaa bracket)

zeiss74

New Member
Joined
Oct 19, 2015
Messages
10
This is a bit of a rush order, since it's for an NCAA pool due tomorrow.

i have sorted my teams by odds of winning, but different seeds cost me differently.

So I have 3 columns: team-odds-cost

and I would like Excel to tell me:
"If cost can't go over 100, these are the N teams to choose to maximize the sum of odds." I would not specify N, Excel would be open to any N, as long as it adds to the highest odds.

Any chance of getting this to work tonight?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
You could let Solver have a whack at it.

If you don't have it installed, click on File > Options > Add-ins > on the drop-down box on the bottom select > Excel Add-ins > Go > check Solver Add-in > OK.

Then set up your sheet like this:

ABCDEFG
1TeamoddscostIncludecostsum of oddsN
2A0.7435972110013.3019520
3B0.322926150
4C0.94104781
5D0.087948190
6E0.890444190
7F0.0973141
8G0.447467110
9H0.62401651
10I0.92963341
11J0.55173361
12K0.15749140
13L0.76660981
14M0.258603130
15N0.12597670
16O0.285883110
17P0.864462170
18Q0.967666100
19R0.524834140
20S0.407858190
21T0.67137471
22U0.0135650
23V0.823129170
24W0.61969120
25X0.465948110
26Y0.940748101
27Z0.39503370
28AA0.359005120
29AB0.97729661
30AC0.681336190
31AD0.313026180
32AE0.16816290
33AF0.300937110
34AG0.45306751
35AH0.733698110
36AI0.643624150
37AJ0.504665180
38AK0.41769311
39AL0.7388951
40AM0.03392120
41AN0.509899180
42AO0.3248851
43AP0.111904120
44AQ0.745815190
45AR0.930339111
46AS0.07149240
47AT0.898091150
48AU0.414297190
49AV0.996209170
50AW0.341761200
51AX0.2457290
52AY0.095352120
53AZ0.5565711
54BA0.70478761
55BB0.827956150
56BC0.020511150
57BD0.73136211
58BE0.34352980
59BF0.12545760
60BG0.438494170
61BH0.036942110
62BI0.261792190
63BJ0.70099921
64BK0.861697140
65BL0.531

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Worksheet Formulas
CellFormula
E2=SUMPRODUCT(C2:C65,D2:D65)
F2=SUMPRODUCT(B2:B65,D2:D65)
G2=SUM(D:D)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Then go to the Data tab, click Solver (far right), and enter these parameters:

Set Objective: F2

By Changing Variable Cells: D2:D65

Subject to the Contraints:
D2:D65 = binary
E2<=100

Select a Solving Method: Evolutionary

And click Solve.

Good luck! And if you win a billion dollar prize, I think I should get a percentage! :LOL:
 
Upvote 0
Thanks Eric. You taught me a few new things: using "binary" instead of "integer and <=1." Also, sumproduct in one cell is a cleaner than me producting in a separate column and then summing. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,851
Members
449,051
Latest member
excelquestion515

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