ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Changing Columns to Rows (https://www.excelbanter.com/excel-discussion-misc-queries/164239-changing-columns-rows.html)

MEAD5432

Changing Columns to Rows
 
I have a column of information. How can I move the data from the a cell in
the column into a cell in a row? For instance:

Currently
Steve Smith
1 some road
some town, CA, 555555
John Anderson
2 some blvd
this town, NY, 555555
John Doe
3 this pkwy
where, TX, 555555


What I want
Steve Smith 1 some road some town, CA 55555
John Anderson 2 some blvd this town, NY, 555555
John Doe 3 this pkway where, TX, 555555

Any help would be appreciated.

Thanks.



Bernard Liengme

Changing Columns to Rows
 
Assuming the data starts in A1; and that there are 3 lines of info for every
person:

In B1 ( or other cell) enter =INDIRECT("A"&3*ROW($A1)-2)
Copy this across to D1
Modify C1's formula to =INDIRECT("A"&3*ROW($A1)-1)
Modify D's formula to =INDIRECT("A"&3*ROW($A1))
Copy these three formulas down as far as needed (to row N/3 where N is the
number of entries in column A
If you wish you can now use Data | Text to columns on column D to separate
Town, State and Zipcode
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"MEAD5432" wrote in message
...
I have a column of information. How can I move the data from the a cell in
the column into a cell in a row? For instance:

Currently
Steve Smith
1 some road
some town, CA, 555555
John Anderson
2 some blvd
this town, NY, 555555
John Doe
3 this pkwy
where, TX, 555555


What I want
Steve Smith 1 some road some town, CA 55555
John Anderson 2 some blvd this town, NY, 555555
John Doe 3 this pkway where, TX, 555555

Any help would be appreciated.

Thanks.





Gary''s Student

Changing Columns to Rows
 
Say your data is in column A.

In B1 enter:

=INDIRECT("A" & ROW()*5-6+COLUMN())

Copy B1 and then paste it in columns B,C,and D as far down as you need.
Here is a sample using numbers:

1 1 2 3
2 4 5 6
3 7 8 9
4 10 11 12
5 13 14 15
6 16 17 18
7 19 20 21
8
9
10
11
12
13
14
15
16
17
18
19
20
21

--
Gary''s Student - gsnu200752


"MEAD5432" wrote:

I have a column of information. How can I move the data from the a cell in
the column into a cell in a row? For instance:

Currently
Steve Smith
1 some road
some town, CA, 555555
John Anderson
2 some blvd
this town, NY, 555555
John Doe
3 this pkwy
where, TX, 555555


What I want
Steve Smith 1 some road some town, CA 55555
John Anderson 2 some blvd this town, NY, 555555
John Doe 3 this pkway where, TX, 555555

Any help would be appreciated.

Thanks.



Gary''s Student

Changing Columns to Rows
 
Sorry, use this instead:

=INDIRECT("A" & ROW()*3-4+COLUMN())

--
Gary''s Student - gsnu200752


"MEAD5432" wrote:

I have a column of information. How can I move the data from the a cell in
the column into a cell in a row? For instance:

Currently
Steve Smith
1 some road
some town, CA, 555555
John Anderson
2 some blvd
this town, NY, 555555
John Doe
3 this pkwy
where, TX, 555555


What I want
Steve Smith 1 some road some town, CA 55555
John Anderson 2 some blvd this town, NY, 555555
John Doe 3 this pkway where, TX, 555555

Any help would be appreciated.

Thanks.




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

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