+ Reply to Thread
Results 1 to 3 of 3

Converting columns of data to multiple records

  1. #1
    Registered User
    Join Date
    09-19-2012
    Location
    Pittsburgh, Pa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Converting columns of data to multiple records

    Hi, I'm relatively new at this, forums, but here we go.

    I have a file with multiple columns of data for a row that I need to convert to multiple records. For example;

    HERE'S HOW I RECEIVE THE DATA

    01 12.34 20110101 12.45 20110112 12.67 20110124
    02 23.45 20100112 23.67 20100219
    03 45.67 20120112 45.89 20120212 45.12 20110314

    HERE'S WHAT I WANT

    01 12.34 20110101
    01 12.45 20110112
    01 12.67 20110124
    02 23.45 20100112
    02 23.67 20100219
    03 45.67 20120112
    03 45.89 20120212
    03 45.12 20110314

    In the source data, every row contains the primary id for the row, and for columns B to AY, contains corresponding data for that record. In the attached sample file I have include what I want, rows 2-10, compared to what I get, rows 11-29.

    Please help an old dog learn a new trick.

    Thanks!
    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: Converting columns of data to multiple records

    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
    Registered User
    Join Date
    09-19-2012
    Location
    Pittsburgh, Pa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Converting columns of data to multiple records

    Arlette, Thanks for the code, that's exactly what I was looking for. I was concerned about missing data per row. Thanks again.

+ 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