concatenate in combination

E

Erico Franco

hi,

How do I concatenate 2 test columns in combination?


A 1
B 2
C 3
D 4
E 5


that would give me a result as (in just one column):

A1 A2 A3 A4 A5
B1 B2 B3 B4 B5
C1 C2 C3 C4 C5
D1 D2 D3 D4 D5
E1 E2 E3 E4 E5

thanks

Erico Franco
www.micromagiclabs.com
 
G

Guest

Here is a litle VBA:


Sub Macro1()
Dim i, j, k As Integer
k = 1
For i = 1 To 5
For j = 1 To 5
Cells(k, 3) = Cells(i, 1) & Cells(j, 2)
k = k + 1
Next
Next
End Sub

i going to 5 is for column A and can be expanded
j going to 5 is for colmun B and can be expanded
 
E

Erico Franco

Gary''s Student said:
Here is a litle VBA:


Sub Macro1()
Dim i, j, k As Integer
k = 1
For i = 1 To 5
For j = 1 To 5
Cells(k, 3) = Cells(i, 1) & Cells(j, 2)
k = k + 1
Next
Next
End Sub

i going to 5 is for column A and can be expanded
j going to 5 is for colmun B and can be expanded


Hi Gary,

thanks for your code and time!

regards

Erico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top