Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default Can you transpose 1 column into multiple rows creating a table

I am using Excel 2003 on Windows.

I have a list of 5000 numbers in a column and I would like this data
transposed in groups of 5 to create 5 columns and 1000 rows

In other words how do I turn:

1
2
3
4
5
6
7
8
9
10

into

12345
678910

thanks for any suggestions

Richard
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 791
Default Can you transpose 1 column into multiple rows creating a table

Richard, use edit, paste special, transpose, 5 cells at a time. Record a
macro when you do the first transpose and assign it to a button on a tool
bar. You'll then just need to click the button to transpose 5 cells at a
time. As part of the macro, after the first transpose, insert a row at row
1, moving the first transpose down, and delete the first 5 cells in column A.
This way, the macro will always select the first 5 cells in column A and
allways transpose into B1:F1. HTH
--
Sincerely, Michael Colvin


"Richard" wrote:

I am using Excel 2003 on Windows.

I have a list of 5000 numbers in a column and I would like this data
transposed in groups of 5 to create 5 columns and 1000 rows

In other words how do I turn:

1
2
3
4
5
6
7
8
9
10

into

12345
678910

thanks for any suggestions

Richard

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default Can you transpose 1 column into multiple rows creating a table

If your 1 is in A1, then in B1 put the formula
=OFFSET($A$1,COLUMN()-2+(ROW()-1)*5,0)
Copy this across your 5 columns and down your 1000 rows.
--
David Biddulph

"Richard" wrote in message
...
I am using Excel 2003 on Windows.

I have a list of 5000 numbers in a column and I would like this data
transposed in groups of 5 to create 5 columns and 1000 rows

In other words how do I turn:

1
2
3
4
5
6
7
8
9
10

into

12345
678910

thanks for any suggestions

Richard



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Can you transpose 1 column into multiple rows creating a table

Richard

Assuming data is in column A.......

In B1 enter this formula

=INDEX($A:$A,(ROWS($1:1)-1)*5+COLUMNS($A:B)-1)

Drag/copy across to F1

Select B1:F1 and drag/copy down until you get zeros.

When happy, copy and paste special(in place)valuesOKEsc

Delete column A

A macro can go much faster and leave no formulas to deal with.

Sub ColtoRows()
Dim rng As Range
Dim i As Long
Dim j As Long
Set rng = Cells(Rows.Count, 1).End(xlUp)
j = 1
On Error Resume Next
nocols = InputBox("Enter Number of Columns Desired")
For i = 1 To rng.Row Step nocols
Cells(j, "A").Resize(1, nocols).Value = _
Application.Transpose(Cells(i, "A").Resize(nocols, 1))
j = j + 1
Next
Range(Cells(j, "A"), Cells(rng.Row, "A")).ClearContents
End Sub

You would enter 5 in the inputbox.


Gord Dibben MS Excel MVP

On Thu, 2 Nov 2006 07:45:01 -0800, Richard
wrote:

I am using Excel 2003 on Windows.

I have a list of 5000 numbers in a column and I would like this data
transposed in groups of 5 to create 5 columns and 1000 rows

In other words how do I turn:

1
2
3
4
5
6
7
8
9
10

into

12345
678910

thanks for any suggestions

Richard


Gord Dibben MS Excel MVP
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default Can you transpose 1 column into multiple rows creating a table

Thank you very much David this is exactly what I wanted.

Regards,

Richard

"David Biddulph" wrote:

If your 1 is in A1, then in B1 put the formula
=OFFSET($A$1,COLUMN()-2+(ROW()-1)*5,0)
Copy this across your 5 columns and down your 1000 rows.
--
David Biddulph




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default Can you transpose 1 column into multiple rows creating a table

Or for fans of Pivot Table...
Generate Row and Column with
=INT((ROW()-2)/5)+1
=MOD(ROW()-2,5)+1

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default Can you transpose 1 column into multiple rows creating a table

Thanks a lot guys. I couldn't even figure out one elegant way to do this, and
you have given me a handful of options.

I have lots to learn about Excel.

Thanks again,

Richard
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 into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
In a pivot table, can the avg of a column include rows w/o data? Aaron Excel Discussion (Misc queries) 2 April 17th 06 03:20 PM
Change a Column list into multiple rows & columns angelface Excel Worksheet Functions 3 January 28th 06 01:23 AM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
How can I convert a data from multiple rows into 1 column? yudi_lks Excel Worksheet Functions 10 January 30th 05 03:47 AM


All times are GMT +1. The time now is 03: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"