#1   Report Post  
Bottle
 
Posts: n/a
Default Linking List

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
  #2   Report Post  
JulieD
 
Posts: n/a
Default

How would you like them displayed? as excel is limited to 65,536 row?

"Bottle" wrote in 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



  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
not tested but try the following macro on a separate sheet

sub foo()
dim row_index as long
dim col_index as long
dim i as integer
dim j as integer
dim src_sheet as worksheet
dim tar_sheet as worksheet
row_index=1
col_index=1

set src_sheet=activeworkbook.worksheets("sheet1")
set tar_sheet=activeworkbook.worksheets("sheet2")
application.screenupdate=false
for i = 1 to 432
for j = 1 to 559
tar_sheet.cells(row_index,col_index).value =
src_sheet.cells(i,1).value*src_sheet.cells(j,1).va lue
row_index=row_index+1
if row_index=65000 then
row_index=1
col_index=col_index+1
end if
next
next
application.screenupdate=true
end sub

--
Regards
Frank Kabel
Frankfurt, Germany
"Bottle" schrieb im Newsbeitrag
...
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



  #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
.

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


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 01:16 AM.

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

About Us

"It's about Microsoft Excel"