Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default How to combine multiple columns into different cells in one column

I have data in different columns starting with column A going down row 1 thru
14. So column B row 1 thru 14, column C 1 thru 14, etc.

I need to consolidate everything from column a1-a14 to agu1-agu14 into one
column, for example:

a1
a2
a3
..
..
..
a14
b1
b2
b3
..
..
..
b14

etc.

How do I go about doing this?

I tried doing transpose and that didn't work.

I'm using Excel 2007 if that makes a difference.

Thanks
Blake
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to combine multiple columns into different cells in one column

Option Explicit
Sub testme()

Dim CurWks As Worksheet
Dim NewWks As Worksheet
Dim FirstRow As Long
Dim FirstCol As Long
Dim LastCol As Long
Dim iCol As Long
Dim HowManyToCopy As Long
Dim RngToCopy As Range
Dim DestCell As Range

Set CurWks = Worksheets("Sheet1")
Set NewWks = Worksheets.Add

HowManyToCopy = 14

With NewWks
Set DestCell = .Range("A1")
End With

With CurWks
FirstCol = 1
LastCol = .Cells(1, .Columns.Count).End(xlToLeft).Column
'or if row 1 may not always be used...
LastCol = .Range("AUG1").Column

FirstRow = 1

For iCol = FirstCol To LastCol
Set RngToCopy = .Cells(FirstRow, iCol).Resize(HowManyToCopy)
RngToCopy.Copy _
Destination:=DestCell
Set DestCell = DestCell.Offset(RngToCopy.Rows.Count)
Next iCol
End With
End Sub


Blake wrote:

I have data in different columns starting with column A going down row 1 thru
14. So column B row 1 thru 14, column C 1 thru 14, etc.

I need to consolidate everything from column a1-a14 to agu1-agu14 into one
column, for example:

a1
a2
a3
.
.
.
a14
b1
b2
b3
.
.
.
b14

etc.

How do I go about doing this?

I tried doing transpose and that didn't work.

I'm using Excel 2007 if that makes a difference.

Thanks
Blake


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How to combine multiple columns into different cells in one column



"Blake" wrote:

I have data in different columns starting with column A going down row 1 thru
14. So column B row 1 thru 14, column C 1 thru 14, etc.

I need to consolidate everything from column a1-a14 to agu1-agu14 i
I tried doing transpose and that didn't work.


Blake, what do you mean by "consolidate"? Do you mean add the contents of
each row across? Do you have numbers in your cells and you want to add them,
or text and you want to concatenate them? The answer if they are numbers is
to use SUM(A1:AGU14) and if you have text you can concatenate them (A1 & B1
etc good luck with that!)
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default How to combine multiple columns into different cells in one column

I have data in different columns starting with column A going down row
1 thru 14. So column B row 1 thru 14, column C 1 thru 14, etc.

I need to consolidate everything from column a1-a14 to agu1-agu14 into
one column, for example:

a1
a2
a3
.
.
.
a14
b1
b2
b3
.
.
.
b14

etc.


Here's one way with Excel 2003.

If the data is in Sheet 1, put this formula in Sheet2!A1 and copy down as
far as needed:
=OFFSET(Sheet1!$A$1,MOD(ROW()-1,14),INT((ROW()-1)/14))

If some cells in Sheet1 are empty, you'll see zeros for them in Sheet2.
If this is a problem, try
=IF(<above formula="", "", <above formula)
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default How to combine multiple columns into different cells in one column

=INDEX($A$1:$AGU$14,MOD(ROWS($1:43)-1,14)+1,CEILING(ROWS($1:43)/14,1))

copy down as far as needed


"Blake" wrote:

I have data in different columns starting with column A going down row 1 thru
14. So column B row 1 thru 14, column C 1 thru 14, etc.

I need to consolidate everything from column a1-a14 to agu1-agu14 into one
column, for example:

a1
a2
a3
.
.
.
a14
b1
b2
b3
.
.
.
b14

etc.

How do I go about doing this?

I tried doing transpose and that didn't work.

I'm using Excel 2007 if that makes a difference.

Thanks
Blake

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine multiple columns Nichole Excel Discussion (Misc queries) 5 December 1st 08 09:25 PM
How can I combine multiple columns of data into 1 column? Frank New Users to Excel 1 January 17th 07 07:37 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
How do I combine multiple columns into just 1 column? scosus Excel Discussion (Misc queries) 1 November 2nd 05 04:21 PM


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"