Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Transpose problem

Hi

I have data organised as:

A 1 2 3
B 4 5
C 6 7
I want to rearrange it as:
A 1
A 2
A 3
B 4
B 5
C 6
C 7

The standard transpose doesn't help. I guess this will have to be done
programatically. Can someone help?

Thanks
Utkarsh
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Transpose problem

Sub MoveData()

Set sht = Worksheets.Add(after:=Sheets(Sheets.Count))

RowCount = 1
NewRowCount = 1
With Sheets("Sheet1")
Do While .Range("A" & RowCount) < ""
Header = .Range("A" & RowCount)
LastCol = _
.Cells(RowCount, Columns.Count).End(xlToLeft).Column
For ColCount = 2 To LastCol
If .Cells(RowCount, ColCount) < "" Then
sht.Range("A" & NewRowCount) = Header
sht.Range("B" & NewRowCount) = _
.Cells(RowCount, ColCount)
NewRowCount = NewRowCount + 1
End If
Next ColCount
RowCount = RowCount + 1
Loop
End With

End Sub


"Utkarsh" wrote:

Hi

I have data organised as:

A 1 2 3
B 4 5
C 6 7
I want to rearrange it as:
A 1
A 2
A 3
B 4
B 5
C 6
C 7

The standard transpose doesn't help. I guess this will have to be done
programatically. Can someone help?

Thanks
Utkarsh

Reply
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
Problem in Transpose Hetal Vora[_2_] Excel Discussion (Misc queries) 0 February 9th 09 04:09 PM
Transpose problem Barry Lennox[_2_] Excel Discussion (Misc queries) 4 January 7th 09 07:04 PM
Transpose Problem Hazel Excel Discussion (Misc queries) 3 February 20th 07 05:55 PM
Transpose problem lt[_2_] Excel Programming 2 October 20th 06 09:01 PM
Transpose Problem JA Excel Programming 5 June 4th 04 08:57 AM


All times are GMT +1. The time now is 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"