Creating exception to random Team generator

paulgunther

New Member
Joined
Oct 30, 2019
Messages
31
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet that assigns players to random holes (Start) based on a chosen number of players per card (I3). It's fairly simple and I also have a macro assigned to a button that copies the "random" column and pastes values to the "static" column to re-randomize at will. The "hole_assignment" table is to assign the holes in a specific, non-sequential order. This works fine as designed.

Question: I would like to occasionally assign certain players to specific holes (column A) and have the Start column account for the pre-assigned starting hole and randomize the rest.

Example: Player 2, pre-assigned hole 8, Player 6 pre-assigned hole 8. I now need the randomizer to only assign 2 additional players to hole 8 and automatically place those players on their respective pre-assigned holes.

Random Card.xlsm
ABCDEFGHI
1
2Non RandomCardPlayerStartGroupRandomStatic
3Player 1270.2263043540.262627438Card Size4
48Player 2820.3879379380.796961803
5Player 31030.6701634850.68759244CardAssigned Hole
6Player 4460.5389380970.35194473911
7Player 51030.6408439280.74684021828
88Player 61030.8737932760.75425269310
9Player 71240.5654047050.627886504412
10Player 8110.4988491780.87951887256
11Player 99100.0932334210.04976329364
12Player 101390.797314870.09855282472
13Player 11110.6819009280.889456719811
14Player 12650.7408938520.569148347913
15Player 13110.340686960.865395664109
16Player 14460.9233135340.369695062113
17Player 151390.7531950940.13534933127
18Player 161180.8870338330.2111415521318
19Player 17460.6603175250.517424354145
20Player 18650.7532726010.554959501
21Player 19650.5153775270.524942895
22Player 201180.2742464570.256438207
23Player 211390.4251237450.149393574
24Player 229100.631862220.026967303
25Player 239100.341396670.096754073
26Player 24460.8051692220.388082165
27Player 251240.4998070020.615633054
28Player 261180.7721284090.217260568
29Player 27270.723632090.292360797
30Player 28110.167612520.905538699
31Player 29270.4967091590.270637506
32Player 30650.1722856520.564299634
33Player 31270.1871673010.261168275
34Player 32820.4636778770.784721414
35Player 33820.3399543980.782527076
36Player 34820.5471294770.796425025
37Player 351180.3305127370.201663754
38Player 361030.7042708740.764741023
39Player 371240.1209793360.597508326
40Player 381240.620319410.639348663
41Player 391390.9444481480.195836014
42Player 409100.7291462530.047685875
WORKING
Cell Formulas
RangeFormula
C3:C42C3=VLOOKUP([@Group],Hole_Assignment,2)
D3:D42D3=CEILING(RANK([@Static],[Static])/$I$3,1)
E3:F42E3=RAND()
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A3:A42Expression=COUNTIF($A$3:$A$42, A3) = 2textNO
A3:A42Expression=COUNTIF($A$3:$A$42, A3) = 3textNO
A3:A42Expression=COUNTIF($A$3:$A$42, A3) = 4textNO
C3:C42Expression=COUNTIF($C$3:$C$42, C3) = 2textNO
C3:C42Expression=COUNTIF($C$3:$C$42, C3) = 3textNO
C3:C42Expression=COUNTIF($C$3:$C$42, C3) = 4textNO
C3:C42Expression=COUNTIF($C$3:$C$42, C3) = 5textNO
C3:C42Expression=COUNTIF($C$3:$C$42, C3) > 5textNO
B3:B42Cell ValueduplicatestextNO
Cells with Data Validation
CellAllowCriteria
B2Any value
C3:D42Any value
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Surely if the non random column is blank the formula should calculate the group.
 
Upvote 0
Surely if the non random column is blank the formula should calculate the group.
Absolutely. And in the end I delete the rows in the table that do not have a player assigned, however is there a way to check to see if the Player column is not blank before calculating the group assignment?
I may have just answered my own question. Let me try nesting the group formula in an "if statement"....
 
Upvote 0
Glad you sorted it.
Hello again,
I'm now trying to incorporate this into a google doc spreadsheet and this formula may be too sophisticated to run. I've adapted all the references to match the "dumbed down" spreadsheet in Google Docs and I'm now getting this error: "Function SORT parameter 2 expects number values. But '' is a empty and cannot be coerced to a number." Also, I'm not sure how to show this spreadsheet here.
 
Upvote 0
I know very little about Sheets & so cannot help with that.
 
Upvote 0
I know very little about Sheets & so cannot help with that.
Same here. I just found that I need to let others use this sheet and it was the easiest way to share... or so I thought. Thanks for your prompt reply!!
 
Upvote 0
Rather than using Sheets to share the file, why not use Excel Online? That way the formula will still work.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,922
Members
449,056
Latest member
denissimo

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