+ Reply to Thread
Results 1 to 11 of 11

Change horizontal data into vertical data

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    5

    Change horizontal data into vertical data

    My sheet contains an identifier and 12 columns of data. There are 414 identifiers. I need to show the identifiers in one column (12 times) with the data next to each identifier. Please can someone help?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,477

    Re: Change horizontal data into vertical data

    Clearly, you can picture what the data looks like now and how you would like to see it. Unfortunately, we cannot.

    It would help us all if you uploaded a sample workbook with before and after views.

    Regards, TMS
    Last edited by TMS; 09-20-2012 at 05:03 AM. Reason: typo
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Change horizontal data into vertical data

    Thanks i will do that

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

    Re: Change horizontal data into vertical data

    Sure, why dont you upload a sample file?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    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]

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

    Re: Change horizontal data into vertical data

    Sorry TMS. Didnt refresh the screen.

  6. #6
    Registered User
    Join Date
    09-20-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Change horizontal data into vertical data

    This is what it looks like:
    Code Jul-12 Aug-12 Sep-12 Oct-12 Nov-12 Dec-12 Jan-13 Feb-13 Mar-13 Apr-13 May-13 Jun-13
    1000 42,121 42,670 43,219 43,768 44,316 44,865 45,414 45,963 46,512 47,060 47,609 48,158
    1014 341,020 338,138 335,255 332,372 329,490 326,607 323,725 320,842 317,959 315,077 312,194 309,312
    1015 109,248 108,829 108,410 107,990 107,571 107,152 106,732 106,313 105,894 105,474 105,055 104,636
    1017 48,376 48,288 48,199 48,111 48,022 47,934 47,845 47,757 47,668 47,580 47,491 47,403
    1022 34,915 33,434 31,953 30,471 28,990 27,509 26,028 24,547 23,066 21,585 20,104 18,623

    Want it to look like:


    1,000 42,121 Jul-12
    1,000 42,670 Aug-12
    1,000 43,219 Sep-12
    1,000 43,768 Oct-12
    1,000 44,316 Nov-12
    1,000 44,865 Dec-12
    1,000 45,414 Jan-13
    1,000 45,963 Feb-13
    1,000 46,512 Mar-13
    1,000 47,060 Apr-13
    1,000 47,609 May-13
    1,000 48,158 Jun-13
    1,014 341,020 Jul-13
    1,014 338,138 Aug-13
    1,014 335,255 Sep-13
    1,014 332,372 Oct-13
    1,014 329,490 Nov-13
    1,014 326,607 Dec-13
    1,014 323,725 Jan-14
    1,014 320,842 Feb-14
    1,014 317,959 Mar-14
    1,014 315,077 Apr-14
    1,014 312,194 May-14
    1,014 309,312 Jun-14

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

    Re: Change horizontal data into vertical data

    You may be looking for a formula solution, however if you need VBA, here is a code that you can use -
    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

  8. #8
    Registered User
    Join Date
    09-20-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Change horizontal data into vertical data

    Tx Arlette, here is the file. Hope it works.

    Alan
    Attached Files Attached Files

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

    Re: Change horizontal data into vertical data

    Try the above code (post 7) and let me know if you face any issues.

  10. #10
    Registered User
    Join Date
    09-20-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Change horizontal data into vertical data

    Hi Arlette,

    Still tryiong to figure out forum.

    I changed the sheet numbers in the code to match my workbook and the code worked. I don't understand the code but git the result, thanks for the help.

    Alan

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

    Re: Change horizontal data into vertical data

    Np at all.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    I will do it for you this time.
    Last edited by arlu1201; 09-20-2012 at 05:43 AM.

+ 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