Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pausing a macro to input cell contents blipityblap New Users to Excel 3 January 13th 09 11:01 PM
Making cell contents dependent on another cell Jen Excel Worksheet Functions 2 February 23rd 08 10:05 PM
Making cell contents dependent on another cell Jen Excel Discussion (Misc queries) 4 February 22nd 08 07:37 PM
macro with input msg based on cell contents Janelle S[_2_] Excel Discussion (Misc queries) 2 February 9th 08 11:47 PM
How to display contents of a cell in UserForm and take input ssexcel[_3_] Excel Programming 2 October 28th 03 12:37 AM


All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"