Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI,
Please provide help on how to generate data on all comibinations in an excel I have 3 clumns Sec - has 4 values Acc - has 8 values Type - 4 values with the available data, i reuqire either an addin or macro or any tiool that would generate data will all the combinations of values so, with the above example - excel shoud have: 4 * 8* 4 =128 rows in excel. how to do it? Thanks, Venkat |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Venkatesh()
sec = Array("sec1", "sec2", "sec3", "sec4") acc = Array(1, 2, 3, 4, 5, 6, 7, 8) tipe = Array("t1", "t2", "t3", "t4") L = 1 For i = 0 To 3 For j = 0 To 7 For k = 0 To 3 Cells(L, 1).Value = sec(i) Cells(L, 2).Value = acc(j) Cells(L, 3).Value = tipe(k) L = L + 1 Next Next Next End Sub Naturally, put your own values in the array statements. -- Gary''s Student - gsnu200816 "Venkatesh V" wrote: HI, Please provide help on how to generate data on all comibinations in an excel I have 3 clumns Sec - has 4 values Acc - has 8 values Type - 4 values with the available data, i reuqire either an addin or macro or any tiool that would generate data will all the combinations of values so, with the above example - excel shoud have: 4 * 8* 4 =128 rows in excel. how to do it? Thanks, Venkat |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
excellent. thanks
"Gary''s Student" wrote: Sub Venkatesh() sec = Array("sec1", "sec2", "sec3", "sec4") acc = Array(1, 2, 3, 4, 5, 6, 7, 8) tipe = Array("t1", "t2", "t3", "t4") L = 1 For i = 0 To 3 For j = 0 To 7 For k = 0 To 3 Cells(L, 1).Value = sec(i) Cells(L, 2).Value = acc(j) Cells(L, 3).Value = tipe(k) L = L + 1 Next Next Next End Sub Naturally, put your own values in the array statements. -- Gary''s Student - gsnu200816 "Venkatesh V" wrote: HI, Please provide help on how to generate data on all comibinations in an excel I have 3 clumns Sec - has 4 values Acc - has 8 values Type - 4 values with the available data, i reuqire either an addin or macro or any tiool that would generate data will all the combinations of values so, with the above example - excel shoud have: 4 * 8* 4 =128 rows in excel. how to do it? Thanks, Venkat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create a macro in excel so that it can generate a list ofunique records using all permutations and combinations of the data in eachrow ad column | Excel Discussion (Misc queries) | |||
Help with a formula: Data Combinations | Excel Discussion (Misc queries) | |||
generate a random number and use if function to generate new data | Excel Worksheet Functions | |||
Generate table of combinations | Excel Programming | |||
Generate all possible combinations from three data sets? | Excel Programming |