+ Reply to Thread
Results 1 to 3 of 3

Help needed for a MACRO to transpose data from multiple variable columns into rows.

  1. #1
    Registered User
    Join Date
    06-30-2014
    Location
    Libertyville
    MS-Off Ver
    Office 2010
    Posts
    2

    Smile Help needed for a MACRO to transpose data from multiple variable columns into rows.

    Hi! This is my first time posting on Excel Forum but I'm excited to hear from you experts. I have almost no background in VBA but I need some help for a MACRO that I believe is possible to create based on my research online. Here what I need to figure out...
    I have a table where the last few columns have numbers spread across the same row. The number of columns that contain numbers varies per row, so, some rows may have 20 columns with data and some with 2 or 3. These columns looks kind of like the following:
    Column1 Column2 Column3 Column4......
    2 3 5 77
    Before these data columns is a column that states the number of columns with data fields populated in that row.
    What I need to do is to make a macro that reads the number in this column (The column that defines the number of data columns in a row) and inserts those many rows below the original row, after which the the columns with the actual would be copied and transposed below the orignal row. To further explain this, imagine the column following the data fields shown above said "14". I would need the macro to read this number insert 14 blank rows below that row and copy the data from columns, transpose and paste, as shown below:
    Column1
    2
    3
    5
    77
    .
    ...
    ...
    until all 14 rows are populated with data.

    I found this discussion
    http://www.excelforum.com/excel-prog...iple-rows.html
    kinda helpful but totally clueless how I should go about this.
    Any help will be much appreciated!
    Thanks a lot!!
    Attached Files Attached Files
    Last edited by excel_starter; 06-30-2014 at 02:31 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help needed for a MACRO to transpose data from multiple variable columns into rows.

    Post the excel file, without confidential information.

    I can't open de link you added.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    06-30-2014
    Location
    Libertyville
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Help needed for a MACRO to transpose data from multiple variable columns into rows.

    Hi Oeldere I have fixed the link and attached a generic file....The column (Total number of Fields) is the number of columns to be copied and the rest after this column are the columns that need to be transposed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 06-30-2014, 07:23 PM
  2. [SOLVED] Macro to transpose data from two columns into multiple rows
    By Wolopter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2014, 07:18 AM
  3. [SOLVED] Macro to Transpose variable columns into rows
    By Awalgaonkar in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-18-2013, 01:11 PM
  4. [SOLVED] VB code Macro needed to transpose data from columns to rows
    By raw_geek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-20-2012, 08:54 AM
  5. [SOLVED] Macro to transpose data from two columns into multiple rows
    By Briansva92 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2012, 07:55 PM

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