Need help to create an excel macro (Combine columns) [Solved/Closed]

Posts
4
Registration date
Saturday August 17, 2013
Last seen
September 23, 2013
- - Latest reply: ac3mark
Posts
11177
Registration date
Monday June 3, 2013
Status
Contributor
Last seen
January 21, 2019
- Aug 20, 2013 at 11:27 AM
Hello,

Inputs Col A and Col B ( all data ranges are variable), need out put in C Col. (MACRO), I not good at vba/e , kindly help.

Col A Col B Col C
Input Input Out Put
100114 0001FVT1444 1001140001FVT1444
100119 0001TBL3885 1001140001TBL3885
100935 0001PCU3885 1001140001PCU3885
0001TPE3885 1001140001TPE3885
0001HNG3885 1001140001HNG3885
0001FVT14R4 1001140001FVT14R4
1001190001FVT1444
1001190001TBL3885
1001190001PCU3885
1001190001TPE3885
1001190001HNG3885
1001190001FVT14R4
1009350001FVT1444
1009350001TBL3885
1009350001PCU3885
1009350001TPE3885
1009350001HNG3885
1009350001FVT14R4
Does it make any sence?
For each cell value in col A, need to be combined with all the cell values in col B.

Thanks
See more 

3 replies

Posts
11177
Registration date
Monday June 3, 2013
Status
Contributor
Last seen
January 21, 2019
1903
0
Thank you
Good Afternoon...

A Formula (not macro) would be the following....
=CONCATENATE(A1,A2)


//ark
-Contributor
0
Thank you
thanks 4 ur reply. Issue not resolved.
But I may be not able to make u understand what I want is. Let me try once again.
I need to put n(n is count of rows) numbers of accounts in Col A ( suppose 1,2,3,....).
I need to put n(n is count of rows) numbers of stocks in Col B ( suppose A,B,C...).
Now I need macro for out put in Col C like:_
1A(in C2 cell)
1B(in C3 cell)
1C(in C4 cell)
2A(in C5 cell)
2B(in C6 cell)
2C(in C7 cell)
3A(in C8 cell)
3B(in C9 cell)
3C(in C10 cell)
and so on.
Pls try to answer if possible.

Regards
Posts
11177
Registration date
Monday June 3, 2013
Status
Contributor
Last seen
January 21, 2019
1903
0
Thank you
=concatenate(a2,b2) in cell c2 is correct. If you just cut and pasted it into your sheet thinking it was going to work then that is why.


Your scope has changed from the origianl post of:

Col A Col B Col C
Input Input Out Put
100114 0001FVT1444 1001140001FVT1444

...as the above was the inital example with the need of:
"For each cell value in col A, need to be combined with all the cell values in col B."

So, you can use concatenate as above, or use the & operator as in:
=A2&B2

//ark
-Contributor