Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you very much, this is perfect
Stephen "Bernie Deitrick" wrote: Stephen, With your data table starting in cell A1, with labels in row 1, and all possible values in the columns (without blanks between), run the macro below. This will keep the values in separate cells, but they could just as easily be combined. (Unquote the quoted code if you want the values in one cell - in column A.) HTH, Bernie MS Excel MVP Sub ListCombins() Dim i As Integer Dim j As Integer Dim iMax As Integer Dim jMax As Integer Dim n As Long iMax = Cells(Rows.Count, 1).End(xlUp).Row jMax = Cells(Rows.Count, 2).End(xlUp).Row n = 10 For i = 2 To iMax For j = 2 To jMax Cells(n, 1).Value = Cells(i, 1).Value Cells(n, 2).Value = Cells(j, 2).Value ' Cells(n, 1).Value = Cells(n, 1).Value & " " & Cells(n, 2).Value ' Cells(n, 2).Clear n = n + 1 Next j Next i End Sub "Stephen" wrote in message ... I have a set of columns (undefined number) with an undefined number of parameters for each. I am looking for a way to come up with every combination of those columns / Parameters. For Example: Direction TradeType Buy Spot Sell Fwd Swap Desired: Buy Spot Sell Spot Buy Fwd Sell Fwd Buy Swap Sell Swap Any thoughts on how this can be done? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Answer in function builder but not in worksheet | Excel Worksheet Functions | |||
Simple Equation Builder/Solver in Excel for use in Dell Axim X51v | Excel Worksheet Functions | |||
Permutation in excel | Excel Worksheet Functions | |||
Permutation in excel | Excel Worksheet Functions | |||
Permutation Output | Excel Worksheet Functions |