Hello. I have numbers in a bunch of adjacents rows but the column length is different. For example two numbers, five numbers (in seperate cells) etc. How can I easily combine all of these numbers into one long column? Macro or regular excel.
Hello. I have numbers in a bunch of adjacents rows but the column length is different. For example two numbers, five numbers (in seperate cells) etc. How can I easily combine all of these numbers into one long column? Macro or regular excel.
For that you use something like this:
Formula:
=CONCATENATE(A1,B1,C1,D1)
Adjust the cells to needs and you can have any number of cells in it.
Cheers!
Tsjallie
--------
If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!
If you think design is an expensive waste of time, try doing without ...
Assume your first column of Data is Column A, then
![]()
Option Explicit Sub combo() Dim lr As Long, lc As Long, lra As Long lc = Cells(1, Columns.Count).End(xlToLeft).Column Dim i As Long Application.ScreenUpdating = False For i = 1 To lc lr = Cells(Rows.Count, i).End(xlUp).Row lra = Range("A" & Rows.Count).End(xlUp).Row Range(Cells(1, i), Cells(lr, i)).Copy Range("A" & lra + 1) Next i Application.CutCopyMode = False Application.ScreenUpdating = True MsgBox "complete" End Sub
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
This doesn't work. Spreadsheet attached.
This will combine the 4 columns that you have eliminating all blank cells:
This is an ARRAY FORMUL so enter with Ctrl + Shift + Enter
Formula:
=IFERROR(INDEX(column1,SMALL(IF(column1<>"",ROW(column1)-MIN(ROW(column1))+1),ROWS($1:1))),IFERROR(INDEX(column2,SMALL(IF(column2<>"",ROW(column2)-MIN(ROW(column2))+1),ROWS($1:1)-COUNT(column1))),IFERROR(INDEX(column3,SMALL(IF(column3<>"",ROW(column3)-MIN(ROW(column3))+1),ROWS($1:1)-(COUNT(column1)+COUNT(column2)))),IFERROR(INDEX(column4,SMALL(IF(column4<>"",ROW(column4)-MIN(ROW(column4))+1),ROWS($1:1)-(COUNT(column1)+COUNT(column2)+COUNT(column3)))),""))))
Last edited by newdoverman; 05-05-2015 at 03:27 PM.
<---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.Ron W
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks