Maximum points generator chart

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
787
I manage a team that has a handicapped players skill level. There are 8 players on the team and we can play a maximum of 5 per week.
There is a target maximum combined skill level of 2375, if we exceed that we give up points.

Our players skill levels change sometimes weekly based on prior weeks performance so I always need to recalculate this.
I have tried to create a spreadsheet where i can type in the 8 players individual skill levels and have it show me all the possible combinations that will keep me un der the 2375 limit.
I can't do it.
Would someone be willing to take a crack at this for me?

Skill levels range form 100 to 900.

Thank you all.
 
So another development. or two.
One is if I need to remove a player from this weeks competition and remove him from the list [delete entry] the macro breaks.

Also i would like to run this on an android tablet but the excel app does not support macros. Any ideas?
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
As far as the first development, when you delete an entry, do you delete it from the middle of the list? The macro assumes there are no gaps in the list. If you delete someone from the middle, put the last name in that row. I could update the macro if you want to handle that, but if you want something to run on a tablet, it sounds like you need a formula solution. Kevin9999 provided one in an earlier post, you could try that. Here's an alternate one I came up with:

Book1
ABCDEFGHIJK
1PlayerLevelMax2345B, D, F, G, H0000000000 
2A10023752333B, C, E, F, H000000011695H
3B2502333A, C, D, F, H000000101750G
4C888# of players2295A, D, E, G, H0000001121445G, H
5D45082288A, B, C, E, G000001001200F
6E3002245A, B, D, G, H000001012895F, H
7F2002238A, C, E, F, G000001102950F, G
8G7502233A, B, C, E, H0000011131645F, G, H
9H6952195B, E, F, G, H000010001300E
102195A, D, F, G, H000010012995E, H
112188A, B, C, F, G0000101021050E, G
122183A, C, E, F, H0000101131745E, G, H
132133A, B, C, F, H000011002500E, F
142095A, B, E, G, H0000110131195E, F, H
152088B, C, D, E, F0000111031250E, F, G
162045A, E, F, G, H0000111141945E, F, G, H
171995A, B, F, G, H000100001450D
181988A, B, C, D, E0001000121145D, H
191950B, D, E, F, G0001001021200D, G
201938A, C, D, E, F0001001131895D, G, H
211895B, D, E, F, H000101002650D, F
221888A, B, C, D, F0001010131345D, F, H
231850A, B, D, E, G0001011031400D, F, G
241800A, D, E, F, G0001011142095D, F, G, H
251795A, B, D, E, H000110002750D, E
261750A, B, D, F, G0001100131445D, E, H
271745A, D, E, F, H0001101031500D, E, G
281738A, B, C, E, F0001101142195D, E, G, H
291695A, B, D, F, H000111003950D, E, F
301600A, B, E, F, G0001110141645D, E, F, H
311545A, B, E, F, H0001111041700D, E, F, G
321300A, B, D, E, F0001111152395D, E, F, G, H
33001000001888C
340010000121583C, H
350010001021638C, G
Sheet2
Cell Formulas
RangeFormula
F1:G32F1=LET(c,I1#,t,J1#,n,OFFSET(K1,0,0,2^D5),g,CHOOSE({1,2},t,n),SORT(FILTER(g,(c=5)*(t<=D2)),1,-1))
H1:H256H1=DEC2BIN(SEQUENCE(2^D5,,0),D5)
I1:I256I1=LEN(SUBSTITUTE(H1#,"0",""))
J1:J256J1=MMULT(MID(H1#,SEQUENCE(,D5),1)+0,OFFSET(B2,0,0,D5))
D5D5=COUNTA(A2:A9)
K1:K35K1=TEXTJOIN(", ",1,IF(MID(H1,SEQUENCE($D$5),1)="1",OFFSET($A$2,0,0,$D$5),""))
Dynamic array formulas.


This uses some of the newer array functions. The H:K columns are basically helper columns. You only need to enter the H:J formulas in row 1, and they should fill the rest of the way. The K formula I couldn't do with a Spill formula, so you have to drag it down, although I believe it could be done with the BYROW function (which I don't have). Then the F1 function filters out unwanted rows and sorts by total level. Depending on what version of Excel you have, these could be tweaked.

In any event, you have a few options to look at. Let us know.
 
Upvote 1
As far as the first development, when you delete an entry, do you delete it from the middle of the list? The macro assumes there are no gaps in the list. If you delete someone from the middle, put the last name in that row. I could update the macro if you want to handle that, but if you want something to run on a tablet, it sounds like you need a formula solution. Kevin9999 provided one in an earlier post, you could try that. Here's an alternate one I came up with:

Book1
ABCDEFGHIJK
1PlayerLevelMax2345B, D, F, G, H0000000000 
2A10023752333B, C, E, F, H000000011695H
3B2502333A, C, D, F, H000000101750G
4C888# of players2295A, D, E, G, H0000001121445G, H
5D45082288A, B, C, E, G000001001200F
6E3002245A, B, D, G, H000001012895F, H
7F2002238A, C, E, F, G000001102950F, G
8G7502233A, B, C, E, H0000011131645F, G, H
9H6952195B, E, F, G, H000010001300E
102195A, D, F, G, H000010012995E, H
112188A, B, C, F, G0000101021050E, G
122183A, C, E, F, H0000101131745E, G, H
132133A, B, C, F, H000011002500E, F
142095A, B, E, G, H0000110131195E, F, H
152088B, C, D, E, F0000111031250E, F, G
162045A, E, F, G, H0000111141945E, F, G, H
171995A, B, F, G, H000100001450D
181988A, B, C, D, E0001000121145D, H
191950B, D, E, F, G0001001021200D, G
201938A, C, D, E, F0001001131895D, G, H
211895B, D, E, F, H000101002650D, F
221888A, B, C, D, F0001010131345D, F, H
231850A, B, D, E, G0001011031400D, F, G
241800A, D, E, F, G0001011142095D, F, G, H
251795A, B, D, E, H000110002750D, E
261750A, B, D, F, G0001100131445D, E, H
271745A, D, E, F, H0001101031500D, E, G
281738A, B, C, E, F0001101142195D, E, G, H
291695A, B, D, F, H000111003950D, E, F
301600A, B, E, F, G0001110141645D, E, F, H
311545A, B, E, F, H0001111041700D, E, F, G
321300A, B, D, E, F0001111152395D, E, F, G, H
33001000001888C
340010000121583C, H
350010001021638C, G
Sheet2
Cell Formulas
RangeFormula
F1:G32F1=LET(c,I1#,t,J1#,n,OFFSET(K1,0,0,2^D5),g,CHOOSE({1,2},t,n),SORT(FILTER(g,(c=5)*(t<=D2)),1,-1))
H1:H256H1=DEC2BIN(SEQUENCE(2^D5,,0),D5)
I1:I256I1=LEN(SUBSTITUTE(H1#,"0",""))
J1:J256J1=MMULT(MID(H1#,SEQUENCE(,D5),1)+0,OFFSET(B2,0,0,D5))
D5D5=COUNTA(A2:A9)
K1:K35K1=TEXTJOIN(", ",1,IF(MID(H1,SEQUENCE($D$5),1)="1",OFFSET($A$2,0,0,$D$5),""))
Dynamic array formulas.


This uses some of the newer array functions. The H:K columns are basically helper columns. You only need to enter the H:J formulas in row 1, and they should fill the rest of the way. The K formula I couldn't do with a Spill formula, so you have to drag it down, although I believe it could be done with the BYROW function (which I don't have). Then the F1 function filters out unwanted rows and sorts by total level. Depending on what version of Excel you have, these could be tweaked.

In any event, you have a few options to look at. Let us know.
How does one even think of such a formula 😄!
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,689
Members
449,117
Latest member
Aaagu

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