ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HELP on TRANSPOSE related function. (https://www.excelbanter.com/excel-programming/330650-help-transpose-related-function.html)

sunj99

HELP on TRANSPOSE related function.
 

HELP PLEASE!

I have a large excel spreadsheet. The layout is like this:

A SDF ED
B EFD BR
C ERT RT

How do I transpose everything using VB so they are in one column lik
this:

A
SDF
ED
B
EFD
BR
C
ERT
RT

THANKS A LOT!

--
sunj9
-----------------------------------------------------------------------
sunj99's Profile: http://www.excelforum.com/member.php...fo&userid=2393
View this thread: http://www.excelforum.com/showthread.php?threadid=37566


davidm

HELP on TRANSPOSE related function.
 

Suppose your data occupies Cols A,B,C try:


Sub TransposeThreeSome()
num = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To num
For j = 1 To 3
Cells([d65536].End(xlUp).Row + 1, "D") = Cells(i, j).Value
Next
Next
Range("d2:d" & [d65536].End(xlUp).Row).Cut Range("d1")
Columns("a:c").Delete
End Su

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=37566



All times are GMT +1. The time now is 04:18 PM.

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