How do I merge columns into one in MS Excel


How do I merge columns into one in Excel?

How do I merge columns into one in Excel?

How do I merge columns into one

concatenate function

=concatenate(A1,B1,C1)

where A1, B1, C1 are the cells you want to combine.

or

Concatenation via macro:

———————————————————————————————

Sub ConcatenateColumns()
'Click the top cell in the right-hand column of data that you want to concatenate. _
For example, if cells A1:A100 and B1:B100 contain data, click cell B1.

   Do While ActiveCell <> ""  'Loops until the active cell is blank.

      'The "&" must have a space on both sides or it will be
      'treated as a variable type of long integer.

      ActiveCell.Offset(0, 1).FormulaR1C1 = _
         ActiveCell.Offset(0, -1) & " " & ActiveCell.Offset(0, 0)

      ActiveCell.Offset(1, 0).Select
   LoopEnd Sub
-------------------------------------------------------

OR:

Just use the & character to merge fields.

 If A1 contains "NikolayGul." and B1 contains "WordPress.com"

 in C1 type =A1&" "&B1

 You would get NikolayGul.WordPress.com
Advertisements