Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Is it possible to permutate in Excel

Is it possible to permutate three arrays of numbers in
Excel?

For instance:

Array 1: [a,b,c,d]
Array 2: [A,B,C,D]
Array 3: [1,2,3,4]

I want to solve for every singe combination of Array 1 *
Array 2 * Array 3 (a*A*1, a*A*2, a*A*3, etc.). Is it
possible to automate this process by writing a macro or VB
Script or by another method? Your help is very much
appreciated.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Is it possible to permutate in Excel

I am guessing this is what you want

Sub Combos()
arr1 = Array("a", "b", "c", "d")
arr2 = Array("A", "B", "C", "D")
arr3 = Array("1", "2", "3", "4")
rw = 1
For i = LBound(arr1) To UBound(arr1)
For j = LBound(arr2) To UBound(arr2)
For k = LBound(arr3) To UBound(arr3)
Cells(rw, 1) = arr1(i) & "*" & _
arr2(j) & "*" & arr3(k)
rw = rw + 1
Next: Next: Next
End Sub


--
Regards,
Tom Ogilvy


Henrik wrote in message
...
Is it possible to permutate three arrays of numbers in
Excel?

For instance:

Array 1: [a,b,c,d]
Array 2: [A,B,C,D]
Array 3: [1,2,3,4]

I want to solve for every singe combination of Array 1 *
Array 2 * Array 3 (a*A*1, a*A*2, a*A*3, etc.). Is it
possible to automate this process by writing a macro or VB
Script or by another method? Your help is very much
appreciated.





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



All times are GMT +1. The time now is 12:35 PM.

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

About Us

"It's about Microsoft Excel"