ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   RowsToColumn (https://www.excelbanter.com/excel-programming/342415-rowstocolumn.html)

gh

RowsToColumn
 
I am using Excel 2003. There are 50 rows by 20 columns in the
spreadshett. I need to start with the first row and move the cell
contents to a single column. Then move to the second row and append the
cell values to the column and so on. Is there a function for this?

TIA

Gary''s Student

RowsToColumn
 
Try this little macro:

Sub Macro1()
Dim rr As Range
j = 0
For Each rr In Selection
j = j + 1
Cells(j, 1) = rr.Value
Next
End Sub

If the following table is in B1:E3
1 2 3 4
5 6 7 8
9 10 11 12
then select and run and the result in column A is:
1
2
3
4
5
6
7
8
9
10
11
12


--
Gary's Student


"gh" wrote:

I am using Excel 2003. There are 50 rows by 20 columns in the
spreadshett. I need to start with the first row and move the cell
contents to a single column. Then move to the second row and append the
cell values to the column and so on. Is there a function for this?

TIA



All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com