Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Transpose Data from a column to several rows

I would like to take the first 13 cells in the column and display in one row
and then the next 13 cells in the next row and so on...I have seen many posts
that come close but I was not able to get them to suit my needs. Thanks in
advance for your help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Transpose Data from a column to several rows

stan

Sub ColtoRows()
Dim Rng As Range
Dim I As Long
Dim j As Long
Dim nocols 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

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Sun, 30 Jul 2006 12:47:01 -0700, stansdl
wrote:

I would like to take the first 13 cells in the column and display in one row
and then the next 13 cells in the next row and so on...I have seen many posts
that come close but I was not able to get them to suit my needs. Thanks in
advance for your help.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Transpose Data from a column to several rows

Hi Gord,

Thanks for the reply. I will try this although I am not very familiar with
Macros and VBA.

Regards,
Stan

"Gord Dibben" wrote:

stan

Sub ColtoRows()
Dim Rng As Range
Dim I As Long
Dim j As Long
Dim nocols 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

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Sun, 30 Jul 2006 12:47:01 -0700, stansdl
wrote:

I would like to take the first 13 cells in the column and display in one row
and then the next 13 cells in the next row and so on...I have seen many posts
that come close but I was not able to get them to suit my needs. Thanks in
advance for your help.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Transpose Data from a column to several rows

Hi!

Try this:

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

Copy across to 13 cells then down as needed.

Biff

"stansdl" wrote in message
...
I would like to take the first 13 cells in the column and display in one
row
and then the next 13 cells in the next row and so on...I have seen many
posts
that come close but I was not able to get them to suit my needs. Thanks
in
advance for your help.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Transpose Data from a column to several rows

Biff,

Thank you too. My problem has been solved.

Regards,

Stan

"Biff" wrote:

Hi!

Try this:

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

Copy across to 13 cells then down as needed.

Biff

"stansdl" wrote in message
...
I would like to take the first 13 cells in the column and display in one
row
and then the next 13 cells in the next row and so on...I have seen many
posts
that come close but I was not able to get them to suit my needs. Thanks
in
advance for your help.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Transpose Data from a column to several rows

You're welcome!

Biff

"stansdl" wrote in message
...
Biff,

Thank you too. My problem has been solved.

Regards,

Stan

"Biff" wrote:

Hi!

Try this:

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

Copy across to 13 cells then down as needed.

Biff

"stansdl" wrote in message
...
I would like to take the first 13 cells in the column and display in one
row
and then the next 13 cells in the next row and so on...I have seen many
posts
that come close but I was not able to get them to suit my needs.
Thanks
in
advance for your help.






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
Lookup Data in two seperate Spreadsheets Padraig Excel Worksheet Functions 6 June 28th 06 03:05 PM
combining multiple rows of data into one single row of data myersjl Excel Worksheet Functions 0 March 30th 06 10:39 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Loading Column Data with blank Rows into Data Validation Box ExcelMonkey Excel Worksheet Functions 3 October 13th 05 06:09 PM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM


All times are GMT +1. The time now is 07:19 AM.

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"