+ Reply to Thread
Results 1 to 2 of 2

Need help transposing 3 rows of patterned data into seperate rows and coloumns

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Need help transposing 3 rows of patterned data into seperate rows and coloumns

    Hi All,

    Sorry about having needing assistance again due to my lack in macro knowledge. I am still currently learning.

    I have 2000 data which resembles the following :

    Note: E.g. A1 - BLK 1 / A2 - #01-01 / A3 - 11151 and so on

    BLK 1 BLK 2 BLK 3 BLK 4 BLK 5 BLK 6
    #01-01 #02-02 #03-03 #04-04 #05-05 #06-06
    11151 11152 11153 11154 11155 11156

    I would like it to be formulated into such manner:

    A1 - BLK 1 / B1 - BLK 2
    A2 - #01-01 / B2 - #02-02

    A
    1 BLK 1 BLK 2
    2 #01-01 #02-02
    3 11151 11152
    4
    5 BLK 3 BLK 4
    6 #03-03 #04-04
    7 11153 11154
    8
    9 BLK 5 BLK 6
    10 #05-05 #06-06
    11 11155 11156

    Can anyone help me improvise with this macro code assisted by Special-K to me last night which i highly appreciated the help.

    Sub k1()
    Dim i, j, k, NumOfRows, NumOfCols As Long
    NumOfCols = Sheets("Sheet1").Cells(1, Columns.Count).End(xlToLeft).Column
    k = 0
    For i = 1 To NumOfCols
    NumOfRows = Sheets("Sheet1").Cells(Rows.Count, i).End(xlUp).Row
    For j = 1 To NumOfRows
    k = k + 1
    Sheets("Sheet2").Cells(k, 1) = Sheets("Sheet1").Cells(j, i)
    Next j
    k = k + 1
    Next i

    End Sub


    Thank you!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Need help transposing 3 rows of patterned data into seperate rows and coloumns

    Please attach a sample workbook with expected output for getting better understanding about your data structure


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1