Combing Many Cells into One

codeman_not

New Member
Joined
Jun 25, 2011
Messages
8
Hi. I a have a sheet in which Cells A1 to A50 have a text value. In cell B1, I want to combine the contents of all those cells (A1:A50). I know I can use a formula using "&", but then I have to input each cell (50 times in my case). Is there a simpler way to do this?

Thanks
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Run this:

Code:
Sub Combine()
Dim icell As Range
Dim lastrow As Long
lastrow = Range("A" & Rows.Count).End(xlUp).Row
For Each icell In Range("A1:A" & lastrow)
    If Not IsEmpty(icell) Then
        Range("B1") = Range("B1") & icell
    End If
Next icell
End Sub

Or use =CONCATENATE(A1,A2,A3) etc
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,874
Members
452,949
Latest member
Dupuhini

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