PDA

View Full Version : Solved: Concatenation of columns



jumbel
09-05-2008, 12:57 AM
I have three columns with data and I need to concatenate the three columns and display it in the fourth column.

I need to write a macro for this and I dont know how many rows of data exist. The number of rows may change anytime. Is there any specific code to do this.....Bugging me since one hour.:dunno

Bob Phillips
09-05-2008, 01:54 AM
Why not just a formula

=A2&B2&C2

jumbel
09-05-2008, 02:02 AM
Yes, I can but how can I do that for all rows at the same time.

Bob Phillips
09-05-2008, 02:14 AM
Select all cells, D2 down, enter the formula in the formula bar, and hit Ctrl-Enter. Voila.

jumbel
09-05-2008, 02:24 AM
Thanks man, CTRL-Enter was the key here....so simple

Bob Phillips
09-05-2008, 02:25 AM
A useful, not so well known, key combination :-)