ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transpose Range (https://www.excelbanter.com/excel-programming/311907-transpose-range.html)

weeper

Transpose Range
 
How can I enumerate and transpose all cells in a range (array).

here is my range (before) ("A1:B4"):

A B
-- --
1 2
3 4
5 6
7 8

what i want do to is transpose to Column C like this

C
--
1
2
3
4
5
6
7
8

Thanks
w

Tom Ogilvy

Transpose Range
 
Put this formula in C1, then drag fill down

=OFFSET($A$1,ROUNDDOWN((ROW()-1)/2,0),MOD(ROW()+1,2))

If you want hard coded number, then select column C and do Edit=Copy, then
immediately Edit=Paste Special and select values.

--
Regards,
Tom Ogilvy

"weeper" wrote in message
...
How can I enumerate and transpose all cells in a range (array).

here is my range (before) ("A1:B4"):

A B
-- --
1 2
3 4
5 6
7 8

what i want do to is transpose to Column C like this

C
--
1
2
3
4
5
6
7
8

Thanks
w




weeper

Transpose Range
 
Thanks Tom this is great stuff and it works..., but I
wonder if you had anything on how to implement this via VBA Code?

Thanks,
w

"Tom Ogilvy" wrote:

Put this formula in C1, then drag fill down

=OFFSET($A$1,ROUNDDOWN((ROW()-1)/2,0),MOD(ROW()+1,2))

If you want hard coded number, then select column C and do Edit=Copy, then
immediately Edit=Paste Special and select values.

--
Regards,
Tom Ogilvy

"weeper" wrote in message
...
How can I enumerate and transpose all cells in a range (array).

here is my range (before) ("A1:B4"):

A B
-- --
1 2
3 4
5 6
7 8

what i want do to is transpose to Column C like this

C
--
1
2
3
4
5
6
7
8

Thanks
w






All times are GMT +1. The time now is 10:38 PM.

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