Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using Office 2003 and Windows XP;
Picture 3 columns of values from 167 to 212; each value incrementing by 3. Thus: 167 167 167 170 170 170 173 173 173 176 176 176 179 179 179 .... See above, except that each column goes up to 212; this gives a spread or range of 16 values in each column. I need a macro that will generate a list of these values in every possible combination with one another (16 * 16 * 16 = 4096 combinations - I think). Anyone got a clue how to do this, or has someone out there got some VBA code they can post? Thanks so much in advance for your assistance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the macro below.
HTH, Bernie MS Excel MVP Sub TryNow() Dim i As Integer Dim j As Integer Dim k As Integer Dim r As Long r = 2 For i = 167 To 212 Step 3 For j = 167 To 212 Step 3 For k = 167 To 212 Step 3 Cells(r, 1).Value = i Cells(r, 2).Value = j Cells(r, 3).Value = k r = r + 1 Next k Next j Next i End Sub "XP" wrote in message ... Using Office 2003 and Windows XP; Picture 3 columns of values from 167 to 212; each value incrementing by 3. Thus: 167 167 167 170 170 170 173 173 173 176 176 176 179 179 179 ... See above, except that each column goes up to 212; this gives a spread or range of 16 values in each column. I need a macro that will generate a list of these values in every possible combination with one another (16 * 16 * 16 = 4096 combinations - I think). Anyone got a clue how to do this, or has someone out there got some VBA code they can post? Thanks so much in advance for your assistance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm sure you don't know, but you've helped me out before and I always
appreciate your help. Nice neat solution; I was making it so much more complex. Thanks so much and have a great day. "Bernie Deitrick" wrote: Try the macro below. HTH, Bernie MS Excel MVP Sub TryNow() Dim i As Integer Dim j As Integer Dim k As Integer Dim r As Long r = 2 For i = 167 To 212 Step 3 For j = 167 To 212 Step 3 For k = 167 To 212 Step 3 Cells(r, 1).Value = i Cells(r, 2).Value = j Cells(r, 3).Value = k r = r + 1 Next k Next j Next i End Sub "XP" wrote in message ... Using Office 2003 and Windows XP; Picture 3 columns of values from 167 to 212; each value incrementing by 3. Thus: 167 167 167 170 170 170 173 173 173 176 176 176 179 179 179 ... See above, except that each column goes up to 212; this gives a spread or range of 16 values in each column. I need a macro that will generate a list of these values in every possible combination with one another (16 * 16 * 16 = 4096 combinations - I think). Anyone got a clue how to do this, or has someone out there got some VBA code they can post? Thanks so much in advance for your assistance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is hard to keep track of usernames that aren't real names (like XP), but I'm always glad to help,
and I'm always happy to hear that my suggestions worked, so thanks for the feedback. Bernie MS Excel MVP I'm sure you don't know, but you've helped me out before and I always appreciate your help. Nice neat solution; I was making it so much more complex. Thanks so much and have a great day. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How generate new list in another worksheet from existing list? | Excel Worksheet Functions | |||
How to get all number combination from a list | Excel Programming | |||
Need to generate random values from a list | Excel Discussion (Misc queries) | |||
How do I generate a list from a range of values | Excel Worksheet Functions | |||
Calling (Function?) from Userform_Initialize to generate list of unique values for Combo box | Excel Programming |