LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

You could write all possible combination to a text file
(called testfile.txt under C:\ in this example):

Sub AllCombinations()

'// Constructive criticism from VBA programmers welcome

Dim FSO As Object
Dim myFile As Object
Dim ws As Worksheet
Dim cell As Range
Dim rng1 As Range
Dim rng2 As Range
Dim i As Long
Dim j As Long

Set ws = Workbooks("Book2.xls").Sheets("Sheet1")
Set rng1 = ws.Range("A1:A" & Range("A1").End(xlDown).Row)
Set rng2 = ws.Range("B1:B" & Range("B1").End(xlDown).Row)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set myFile = FSO.CreateTextFile("C:\testfile.txt", True)

For i = 1 To rng1.Rows.Count
For j = 1 To rng2.Rows.Count
myFile.WriteLine ws.Range("A" & i).Value & _
ws.Range("B" & j).Value
Next
Next

myFile.Close

End Sub

---
This assumes your worbook is called Book2.xls, and the
first list is in column A of Sheet1 and the second list
is in column B.

HTH
Jason
Atlanta, GA

-----Original Message-----
I have two lists of numbers one (432) and the other
(559), i would like to link each number in list one to
each number in list two, giving me in total 241488
different numbers.
Is there a formula i could run to do this?
Thanks
.

 
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
Creating a dynamic list Jarrod A Excel Worksheet Functions 1 November 18th 05 11:29 PM
Extracting Values on one list and not another B Schwarz Excel Discussion (Misc queries) 4 January 7th 05 01:48 PM
How do I find out what items are in one list but not in another l. Michelle Craig Excel Discussion (Misc queries) 2 December 22nd 04 08:32 PM
Creating a dynamic list JarrodA Excel Worksheet Functions 3 October 30th 04 04:01 AM
Creating a list from an existing list. Jad Excel Worksheet Functions 1 October 29th 04 06:00 AM


All times are GMT +1. The time now is 12:08 AM.

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"