How do I merge 2 columns into one?

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

Just use the & character to merge fields.

If A1 contains "Hello" and B1 contains "Bob"

in C1 type =A1&" "&B1

You would get Hello Bob.

This works with numbers as well.
 
Upvote 0
use the concatenate function

=concatenate(A1,B1,C1)

where A1, B1, C1 are the cells you want to combine.
 
Upvote 0
Concatenation via macro:

Code:
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
   Loop

End Sub

Another idea....

HTH
 
Upvote 0
How do I merge the two columns below:

Column A:

23/04/2012
23/04/2012
23/04/2012
23/04/2012
23/04/2012
23/04/2012
23/04/2012
23/04/2012
23/04/2012

and Column B:

17:37
20:35
18:55
20:41
21:14
15:04
15:05
15:39
15:54

I tried the merge cells, It did not work.
 
Upvote 0
Try in a spare column

=A1+B1

and copy down. Format as Custom dd/mm/yyyy hh:mm
 
Upvote 0
You may also have to insert a space between the two strings if Excel thinks either of the cells is text instead of number: A1 &" "& B1
 
Upvote 0

Forum statistics

Threads
1,213,550
Messages
6,114,265
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top