Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to merge rows in a column into one cell in excel?

Tags:

excel

vba

E.g

A1:I A2:am A3:a A4:boy  

I want to merge them all to a single cell "Iamaboy"
This example shows 4 cells merge into 1 cell however I have many cells (more than 100), I can't type them one by one using A1 & A2 & A3 & A4 what can I do?

like image 677
red23jordan Avatar asked Nov 15 '11 11:11

red23jordan


People also ask

How do I combine rows in Excel from one column?

Combine rows in Excel with Merge Cells add-in To merge two or more rows into one, here's what you need to do: Select the range of cells where you want to merge rows. Go to the Ablebits Data tab > Merge group, click the Merge Cells arrow, and then click Merge Rows into One.

How do I merge all rows into one column?

You can combine two or more table cells located in the same row or column into a single cell. For example, you can merge several cells horizontally to create a table heading that spans several columns. Select the cells that you want to merge. Under Table Tools, on the Layout tab, in the Merge group, click Merge Cells.

How do I put multiple lines in one cell?

Press Alt + Enter to add another line to the cell. Tip. Keep pressing Alt + Enter until the cursor is where you would like to type your next line of text. Type the next line of text you would like in the cell.


1 Answers

If you prefer to do this without VBA, you can try the following:

  1. Have your data in cells A1:A999 (or such)
  2. Set cell B1 to "=A1"
  3. Set cell B2 to "=B1&A2"
  4. Copy cell B2 all the way down to B999 (e.g. by copying B2, selecting cells B3:B99 and pasting)

Cell B999 will now contain the concatenated text string you are looking for.

like image 92
Mischinab Avatar answered Oct 03 '22 11:10

Mischinab