+ Reply to Thread
Results 1 to 3 of 3

Macro to change sheet - Horizontal (Time Allocation) to Veritical (Tablular) format?

  1. #1
    Registered User
    Join Date
    02-03-2011
    Location
    SFO
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to change sheet - Horizontal (Time Allocation) to Veritical (Tablular) format?

    Hey Gurus, I am trying to reformat a sheet (Excel 2007) from Horizontal (Time allocation) format to Vertical (Tabular) format by using macros. Could you please help me out on this? The macro should be able to run on any number of rows and columns.

    Sample Input Data

    ITEM LOC 1/30/2011 2/6/2011 2/13/2011
    1534 VLLF 5500 11000 5500
    7945 VMED 100 5500 10
    7529 VBOC 20 200 20
    1674 VSAM 5376 0 0

    Expected Output

    ITEM LOC STARTDATE QTY
    1534 VLLF 1/30/2011 5500
    1534 VLLF 2/6/2011 11000
    1534 VLLF 2/13/2011 5500
    7945 VMED 1/30/2011 100
    7945 VMED 2/6/2011 5500
    7945 VMED 2/13/2011 10
    7529 VBOC 1/30/2011 20
    7529 VBOC 2/6/2011 200
    7529 VBOC 2/13/2011 20
    1674 VSAM 1/30/2011 5376
    1674 VSAM 2/6/2011 0
    1674 VSAM 2/13/2011 0

    Please see attached spreadsheet (contain sample data) for both input and expected output.

    Advance thanks all for your help.

    EPalanis
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to change sheet - Horizontal (Time Allocation) to Veritical (Tablular) form

    Please Login or Register  to view this content.


    The macro above is based on the ReOrganize macro published here:
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-03-2011
    Location
    SFO
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to change sheet - Horizontal (Time Allocation) to Veritical (Tablular) form

    Thanks Jerry for your help. Much appreciated.

+ 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