+ Reply to Thread
Results 1 to 4 of 4

Convert Two dimentional table to single dimention

  1. #1
    Registered User
    Join Date
    08-08-2007
    Location
    Vancouver
    MS-Off Ver
    Excel 2002, Excel 2007, Excel for Mac 2011
    Posts
    38

    Convert Two dimentional table to single dimention

    I have a two dimentional table that I want to be able to convert to single dimention records so I can import into database as records.

    Sample two dimentional table
    Description, Week1, Week2, Week 3,
    Widget1, 200, 100, 150
    Widget2, 75, 25, 30
    Widget3, 10, 20, 30

    I want to be able to convert above table into format as below

    Widget1, week1, 200
    Widget1, week2, 100
    widget1, week3, 150
    widget2, week1, 75
    widget2, week2, 25
    widget2, week3, 30
    widget3, week1, 10
    widget3, week2, 20
    widget3, week3, 30

    I do this each week with with approx, 40,000 records, (single dimention) copying and pasting is becoming a chore. Does anyone know a method to address this via functions, macros, formulas, etc. Number of rows and columns vary each time I repeat the exercise.

    Appreciate any help.
    Yves
    Last edited by NBVC; 04-28-2009 at 03:49 PM. Reason: Mark Solved per OP request

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by ychartra
    I have a two dimentional table that I want to be able to convert to single dimention records so I can import into database as records.

    Sample two dimentional table
    Description, Week1, Week2, Week 3,
    Widget1, 200, 100, 150
    Widget2, 75, 25, 30
    Widget3, 10, 20, 30

    I want to be able to convert above table into format as below

    Widget1, week1, 200
    Widget1, week2, 100
    widget1, week3, 150
    widget2, week1, 75
    widget2, week2, 25
    widget2, week3, 30
    widget3, week1, 10
    widget3, week2, 20
    widget3, week3, 30

    I do this each week with with approx, 40,000 records, (single dimention) copying and pasting is becoming a chore. Does anyone know a method to address this via functions, macros, formulas, etc. Number of rows and columns vary each time I repeat the exercise.

    Appreciate any help.
    Yves
    Hi,

    a macro something like
    Please Login or Register  to view this content.
    should do the trick, remember to save your sheet before running the macro.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Thumbs up

    If you're allergic to VBA you can also apply the technique found here : http://www.tek-tips.com/faqs.cfm?fid=5287
    Don't really know why, but il works fantastic
    Last edited by arthurbr; 08-09-2007 at 03:01 AM.

  4. #4
    Registered User
    Join Date
    08-08-2007
    Location
    Vancouver
    MS-Off Ver
    Excel 2002, Excel 2007, Excel for Mac 2011
    Posts
    38

    Thumbs up

    Thanx Bryan it worked.
    Last edited by ychartra01; 11-04-2008 at 06:42 PM.

+ 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