+ Reply to Thread
Results 1 to 4 of 4

Matrix into new rows

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    24

    Matrix into new rows

    Hi there,

    I have a spreadsheet that I'm having issues with. I have a matrix which counts the number of items connected to an ID, which has 1 row. In order for this data to be useful to our developers I need the ID to be repeated by the number of column headers, bringing them into a new column and then bring the quantity into a new column also.

    I have attached a spreadsheet which shows examples of 'What I have' and 'What I need' on 2 tabs.

    If someone could offer advice that'd be great!

    Thanks,
    Jenny
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Matrix into new rows

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Matrix into new rows

    As an option

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-24-2013
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Matrix into new rows

    Hi folks,

    Many thanks for the help with the code above. I now have a new query where I need to do the reverse - make lots of row data go across columns, repeating the header names in D-H? A-C only needs to occur once.

    I've attached a 'what I have / what i want' spreadsheet to illustrate.

    I tried to adapt the code to no avail.

    Please note that the largest store has 68 items (with 5 columns of data that needs extracting), therefore we will be expecting 343 columns of data.

    Thanks,
    Jenny
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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