Forum Discussion
MarekFOLO
Mar 25, 2024Copper Contributor
Creating table from 2 tables (20 000 rows)
Hello I'm looking for help with a problem I'm working on. I have 2 tables, Table 1 has 200 unique values (in rows) Table 2 has 100 unique values (in rows) I need to create Table 3 that will c...
OliverScheurich
Mar 25, 2024Gold Contributor
Sub table3()
Dim i, j, k As Long
Range("D:E").Clear
k = 0
For i = 2 To 101
For j = 2 To 201
Cells(j + k, 4).Value = Cells(i, 2).Value
Cells(j + k, 5).Value = Cells(j, 1).Value
Next j
k = k + 200
Next i
End SubIn the attached file you can click the button in cell I2 to run this macro which returns a list in columns D and E with the values from columns A and B.
- Mta5335Apr 14, 2024Copper Contributor
OliverScheurich Thank you- very helpful!