Populate names in spreadsheet automatically

Rock5150

Board Regular
Joined
Nov 16, 2012
Messages
76
Office Version
  1. 365
Platform
  1. Windows
I have the below data with names. Column A with 60names. I would like Column B and C to populate all possible combinations of names. So the first person listed in A2 would be repeated 60 times in Column B and Column C would populate the other names 2-60. THen row 62 would be person #2 in column B2 times and Column C with each member . There should be after 2 people have 122 (including header) rows total, then keep going . ( i think that's right lol)

EDIT: It should be
sorry grab name in A2 and list that name up to row 60 in column B and in column C have names A3-a61. Then starting in B62, take the name in A3 and repeat so name in A3 is then repeated 59 times and column C starts C62 with the other names to include the name in A1 and skip A2 then start again from A3; then repeat.

Net Game calculator.xlsx
ABC
1Combined1st partner2nd Partner
2Alston James
3Archuleta Michael
4Baker Bea
5Bolden Anthony
6Booker Richard
7Brister Antonio
8Brown Art
9Colebrook James
10Colebrook Sean
11Diaz Mario
12Dubose Damitoin
13Edmonds Jojo
14Edmonds Scott
15Evans Booker
16Foster Kenneth
17Gardner Mary
18Garlington Ryan
19Gary Charles
20Graham Hosea
21Gregory Lyndon
22Hall Griffith
23Harmon Jonathan
24Hill Jerry
25James Leroy
26Johnson Cory
27Kellum Willie
28Kimbrew Raphiel
29Ladner Ron
30Lawrence Prem
31Loveless Albert
32Lowry Mark
33Macedo Tomas
34Mahone Monique
35Marshall Ted
36McDermott Michael
37Monroe Joseph
38Morris David
39Mosley Cecil
40Mosley Emma
41Neal Eric
42Oliver Bobby
43Osborne Jason
44Patterson Terry
45Porter Derrick
46Ragsdale Lincoln
47Scholl Karen
48Scholl Mark
49Sheffield James
50Shelton Michael
51Simeon Ron
52Simmons Elmer
53Spates Ronnie
54Stokes Al
55Suttles Carolyn
56Thomas Kenney
57Tyler Shannon
58Upton Jeff
59Witherspoon Ezekiel
60Wring Betty
61Wring Neal
Handicap and Names
 
Last edited by a moderator:

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
So, I was able to get you half way there. You will need to insert a helper column in Column A and insert a value of 59 in A2 with the formula =A2-1 in A3 and copy that down to the end of your data. That will give you how many times to repeat each name. Then copy the formula in C2 down to C1831. If you go to far it will give you an "#N/A" error.

Book12
ABCD
1Helper ColumnCombined1st partner2nd Partner
259Alston JamesAlston JamesArchuleta Michael
358Archuleta MichaelAlston JamesBaker Bea
457Baker BeaAlston JamesBolden Anthony
556Bolden AnthonyAlston JamesBooker Richard
655Booker RichardAlston JamesBrister Antonio
754Brister AntonioAlston JamesBrown Art
853Brown ArtAlston JamesColebrook James
952Colebrook JamesAlston JamesColebrook Sean
1051Colebrook SeanAlston JamesDiaz Mario
1150Diaz MarioAlston JamesDubose Damitoin
1249Dubose DamitoinAlston JamesEdmonds Jojo
1348Edmonds JojoAlston JamesEdmonds Scott
1447Edmonds ScottAlston JamesEvans Booker
1546Evans BookerAlston JamesFoster Kenneth
1645Foster KennethAlston JamesGardner Mary
1744Gardner MaryAlston JamesGarlington Ryan
Sheet1
Cell Formulas
RangeFormula
C2:C17C2=INDEX($B$2:$B$61,MATCH(1,SIGN(COUNTIF($C$1:C1,$B$2:$B$61)<SUMIF($B$2:$B$61,$B$2:$B$61,$A$2:$A$61)),0))
D2:D17D2=+B3
A3:A17A3=+A2-1
 
Last edited:
Upvote 0
I attached the data but after the first subset with "James Alston", the next name "Michael Archulata didn't care over to the last name. Did i copy wrong? Sorry i put the Number sequence as Column A since Column A is already used for another vlookup but did i think adjust the column in the formula

Net Game calculator.xlsx
ABCDE
1Combined1st partner2nd PartnerHCPHelper
2Alston JamesAlston JamesArchuleta Michael2059
3Archuleta MichaelAlston JamesBaker Bea458
4Baker BeaAlston JamesBolden Anthony2257
5Bolden AnthonyAlston JamesBooker Richard1056
6Booker RichardAlston JamesBrister Antonio1355
7Brister AntonioAlston JamesBrown Art954
8Brown ArtAlston JamesColebrook James753
9Colebrook JamesAlston JamesColebrook Sean452
10Colebrook SeanAlston JamesDiaz Mario151
11Diaz MarioAlston JamesDubose Damitoin-350
12Dubose DamitoinAlston JamesEdmonds Jojo949
13Edmonds JojoAlston JamesEdmonds Scott2548
14Edmonds ScottAlston JamesEvans Booker1747
15Evans BookerAlston JamesFoster Kenneth1846
16Foster KennethAlston JamesGardner Mary1145
17Gardner MaryAlston JamesGarlington Ryan2744
18Garlington RyanAlston JamesGary Charles1943
19Gary CharlesAlston JamesGraham Hosea1742
20Graham HoseaAlston JamesGregory Lyndon1341
21Gregory LyndonAlston JamesHall Griffith540
22Hall GriffithAlston JamesHarmon Jonathan2639
23Harmon JonathanAlston JamesHill Jerry1238
24Hill JerryAlston JamesJames Leroy637
25James LeroyAlston JamesJohnson Cory2636
26Johnson CoryAlston JamesKellum Willie1335
27Kellum WillieAlston JamesKimbrew Raphiel934
28Kimbrew RaphielAlston JamesLadner Ron1133
29Ladner RonAlston JamesLawrence Prem632
30Lawrence PremAlston JamesLoveless Albert731
31Loveless AlbertAlston JamesLowry Mark830
32Lowry MarkAlston JamesMacedo Tomas429
33Macedo TomasAlston JamesMahone Monique428
34Mahone MoniqueAlston JamesMarshall Ted2427
35Marshall TedAlston JamesMcDermott Michael2026
36McDermott MichaelAlston JamesMonroe Joseph1825
37Monroe JosephAlston JamesMorris David524
38Morris DavidAlston JamesMosley Cecil923
39Mosley CecilAlston JamesMosley Emma1822
40Mosley EmmaAlston JamesNeal Eric1721
41Neal EricAlston JamesOliver Bobby3120
42Oliver BobbyAlston JamesOsborne Jason1819
43Osborne JasonAlston JamesPatterson Terry1018
44Patterson TerryAlston JamesPorter Derrick3017
45Porter DerrickAlston JamesRagsdale Lincoln716
46Ragsdale LincolnAlston JamesScholl Karen1815
47Scholl KarenAlston JamesScholl Mark814
48Scholl MarkAlston JamesSheffield James913
49Sheffield JamesAlston JamesShelton Michael912
50Shelton MichaelAlston JamesSimeon Ron1311
51Simeon RonAlston JamesSimmons Elmer910
52Simmons ElmerAlston JamesSpates Ronnie169
53Spates RonnieAlston JamesStokes Al228
54Stokes AlAlston JamesSuttles Carolyn107
55Suttles CarolynAlston JamesThomas Kenney136
56Thomas KenneyAlston JamesTyler Shannon105
57Tyler ShannonAlston JamesUpton Jeff24
58Upton JeffAlston JamesWitherspoon Ezekiel113
59Witherspoon EzekielAlston JamesWring Betty72
60Wring BettyAlston JamesWring Neal261
61Wring NealArchuleta MichaelAlston James230
62Alston JamesArchuleta MichaelArchuleta Michael-1
63Archuleta MichaelArchuleta MichaelBaker Bea-2
64Baker BeaArchuleta MichaelBolden Anthony-3
65Bolden AnthonyArchuleta MichaelBooker Richard-4
66Booker RichardArchuleta MichaelBrister Antonio-5
67Brister AntonioArchuleta MichaelBrown Art-6
68Brown ArtArchuleta MichaelColebrook James-7
69Colebrook JamesArchuleta MichaelColebrook Sean-8
70Colebrook SeanArchuleta MichaelDiaz Mario-9
71Diaz MarioArchuleta MichaelDubose Damitoin-10
72Dubose DamitoinArchuleta MichaelEdmonds Jojo-11
73Edmonds JojoArchuleta MichaelEdmonds Scott-12
74Edmonds ScottArchuleta MichaelEvans Booker-13
75Evans BookerArchuleta MichaelFoster Kenneth-14
76Foster KennethArchuleta MichaelGardner Mary-15
77Gardner MaryArchuleta MichaelGarlington Ryan-16
78Garlington RyanArchuleta MichaelGary Charles-17
79Gary CharlesArchuleta MichaelGraham Hosea-18
80Graham HoseaArchuleta MichaelGregory Lyndon-19
81Gregory LyndonArchuleta MichaelHall Griffith-20
82Hall GriffithArchuleta MichaelHarmon Jonathan-21
83Harmon JonathanArchuleta MichaelHill Jerry-22
84Hill JerryArchuleta MichaelJames Leroy-23
85James LeroyArchuleta MichaelJohnson Cory-24
86Johnson CoryArchuleta MichaelKellum Willie-25
87Kellum WillieArchuleta MichaelKimbrew Raphiel-26
88Kimbrew RaphielArchuleta MichaelLadner Ron-27
89Ladner RonArchuleta MichaelLawrence Prem-28
90Lawrence PremArchuleta MichaelLoveless Albert-29
91Loveless AlbertArchuleta MichaelLowry Mark-30
92Lowry MarkArchuleta MichaelMacedo Tomas-31
93Macedo TomasArchuleta MichaelMahone Monique-32
94Mahone MoniqueArchuleta MichaelMarshall Ted-33
95Marshall TedArchuleta MichaelMcDermott Michael-34
96McDermott MichaelArchuleta MichaelMonroe Joseph-35
97Monroe JosephArchuleta MichaelMorris David-36
98Morris DavidArchuleta MichaelMosley Cecil-37
99Mosley CecilArchuleta MichaelMosley Emma-38
100Mosley EmmaArchuleta MichaelNeal Eric-39
101Neal EricArchuleta MichaelOliver Bobby-40
102Oliver BobbyArchuleta MichaelOsborne Jason-41
103Osborne JasonArchuleta MichaelPatterson Terry-42
104Patterson TerryArchuleta MichaelPorter Derrick-43
105Porter DerrickArchuleta MichaelRagsdale Lincoln-44
106Ragsdale LincolnArchuleta MichaelScholl Karen-45
107Scholl KarenArchuleta MichaelScholl Mark-46
108Scholl MarkArchuleta MichaelSheffield James-47
109Sheffield JamesArchuleta MichaelShelton Michael-48
110Shelton MichaelArchuleta MichaelSimeon Ron-49
111Simeon RonArchuleta MichaelSimmons Elmer-50
112Simmons ElmerArchuleta MichaelSpates Ronnie-51
113Spates RonnieArchuleta MichaelStokes Al-52
114Stokes AlArchuleta MichaelSuttles Carolyn-53
115Suttles CarolynArchuleta MichaelThomas Kenney-54
116Thomas KenneyArchuleta MichaelTyler Shannon-55
117Tyler ShannonArchuleta MichaelUpton Jeff-56
118Upton JeffArchuleta MichaelWitherspoon Ezekiel-57
119Witherspoon EzekielBaker BeaWring Betty-58
120Wring BettyBaker BeaWring Neal-59
121Wring NealBaker BeaAlston James-60
Handicap and Names
Cell Formulas
RangeFormula
B2:B121B2=INDEX($A$2:$A$61,MATCH(1,SIGN(COUNTIF($B$1:B1,$A$2:$A$61)<SUMIF($A$2:$A$61,$A$2:$A$61,$E$2:$E$61)),0))
C2:C121C2=+A3
E3:E121E3=+E2-1
 
Upvote 0
Here is a smaller example. See if it is what you want.

Cell Formulas
RangeFormula
B2:B15B2=LET(rng,A$2:A$6,rws,ROWS(rng),IF(ROWS(B$2:B2)>(rws-1)/2*rws,"",INDEX(rng,IFNA(MATCH(B1,rng,0)+(COUNTIF(B$1:B1,B1)=rws-MATCH(B1,rng,0)),1))))
C2:C15C2=IF(B2="","",INDEX(A$2:A$6,MATCH(B2,A$2:A$6,0)+COUNTIF(B$2:B2,B2)))
 
Upvote 0
Thank you Peter. This would work as you take out duplicates pairings (when they are in B or C as long as the "net" pair is the two people). I will use this for my spreadsheet. Being a little greedy here, but is there a way "as well" to do the above so yes there may be duplicates but In column B, Name 2 would be listed "five times" in that column C would have Name 1, Name 2 (again yes a duplicate) Name 3, Name 4, and Name 5, and then Name 3 would have listed five times Name 1, Name 2, Name 3 (again.)..etc? Name 1, would have Name 1, 2, 3, 4, 5? The reason for this "bigger" duplicate set is that i would go down the list and if Name 1 says i want Name 3 and 5 on my team, the person "asking" for the partner would be in Column B. My goal is as i go down the list, i would put an "x" in column D next to teh pairing so in row 5, if Name 1 comes to me and say "hey I want Name 5", i'll put an x to the right of column C in the corresponding row.

Again the one you provided i will definitely use.
 
Upvote 0
Peter, my desired output per above is below

Net Game calculator.xlsx
ABC
1NamesPartner APartner B
2Name 1Name 1Name 1
3Name 2Name 1Name 2
4Name 3Name 1Name 3
5Name 4Name 1Name 4
6Name 5Name 1Name 5
7Name 2Name 1
8Name 2Name 2
9Name 2Name 3
10Name 2Name 4
11Name 2Name 5
12Name 3Name 1
13Name 3Name 2
14Name 3Name 3
15Name 3Name 4
16Name 3Name 5
17Name 4Name 1
18Name 4Name 2
19Name 4Name 3
20Name 4Name 4
21Name 4Name 5
22Name 5Name 1
23Name 5Name 2
24Name 5Name 3
25Name 5Name 4
26Name 5Name 5
Sheet2
 
Upvote 0
.. is there a way "as well" ..
Sure, that is easier in that you just need a single formula in B2 and the other results will automatically spill to the required columns and rows.

21 08 28.xlsm
ABC
1NamesPartner APartner B
2Name 1Name 1Name 1
3Name 2Name 1Name 2
4Name 3Name 1Name 3
5Name 4Name 1Name 4
6Name 5Name 1Name 5
7Name 2Name 1
8Name 2Name 2
9Name 2Name 3
10Name 2Name 4
11Name 2Name 5
12Name 3Name 1
13Name 3Name 2
14Name 3Name 3
15Name 3Name 4
16Name 3Name 5
17Name 4Name 1
18Name 4Name 2
19Name 4Name 3
20Name 4Name 4
21Name 4Name 5
22Name 5Name 1
23Name 5Name 2
24Name 5Name 3
25Name 5Name 4
26Name 5Name 5
Combos (2)
Cell Formulas
RangeFormula
B2:C26B2=LET(rng,A2:A6,rws,ROWS(rng),CHOOSE({1,2},INDEX(rng,SEQUENCE(rws^2,,0,1/rws)+1),INDEX(rng,MOD(SEQUENCE(rws^2)-1,rws)+1)))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,978
Messages
6,122,547
Members
449,089
Latest member
davidcom

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