Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Making Contents of a cell input for a Module
I am currently using this code in a module for a excel worksheet.
want to simply use excel to create variations of groups for a 2 wee period and list them in a spreadsheet. The following code lis variations for 3 different people (I link the people to a number code) but I want the group size to be dynamic (the cell that uses the permut function) will determine the group size. For example instead of jus printing all the variations for 1,2, andn 3 I want it to print th variations for 1,2,3,4,5, etc. up to 9 different group members. Pleas help me. Sub Variations() RowNr = 1 Ilow = 0 For I = 0 To 9 For J = 0 To 9 If J < I Then For K = 0 To 9 If K < J And K < I Then For L = 0 To 9 If L < K And L < J And L < I Then Cells(RowNr, 2) = I * 1000 + J * 100 + K * 10 + L RowNr = RowNr + 1 End If Next L End I -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pausing a macro to input cell contents | New Users to Excel | |||
Making cell contents dependent on another cell | Excel Worksheet Functions | |||
Making cell contents dependent on another cell | Excel Discussion (Misc queries) | |||
macro with input msg based on cell contents | Excel Discussion (Misc queries) | |||
How to display contents of a cell in UserForm and take input | Excel Programming |