LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default transposing data

try this

assumed col A & Col b has data.

if you run the below macro, output will be from Col D.

Sub TEST_IT()
Dim r As Integer, z As Integer, r1 As Integer

z = 1
r1 = 1
r = Cells(Rows.Count, "B").End(xlUp).Row
For i = 1 To r
If Cells(i, "b").Value = "" Then
z = 1
r1 = Cells(Rows.Count, "e").End(xlUp).Row + 1
ElseIf Cells(i, "B").Value < "" Then
z = z + 1
Cells(r1, z + 2) = Cells(i, "B").Value
End If
Next i

End Sub



On Oct 25, 6:20*pm, Sriram wrote:
i have a maximum of 48 rows

Thanks

"Sriram" wrote:
hi,


i have data in the below format in excel


A 1
B 2
C 3
D 4
(empty row)
(empty row)
A 5
B 6
C 7
D 8


and it runs into few hundred thousand rows, is there any way in which i
could transpose data in the format


A B C D
1 2 3 4
5 6 7 8
without having to paste special and then transpose record by record


Thanks


 
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
Transposing data? Sarah (OGI) Excel Worksheet Functions 3 September 7th 07 10:36 PM
Transposing data Biff Excel Worksheet Functions 3 August 21st 07 09:06 PM
transposing vertical data to horizontal with varying amount of data Ghosty Excel Discussion (Misc queries) 5 August 1st 06 05:20 AM
Transposing data Smish Excel Discussion (Misc queries) 1 November 15th 05 03:57 AM
Transposing data Lynn Bales New Users to Excel 3 August 9th 05 06:21 PM


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

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"