Closed Thread
Results 1 to 7 of 7

Help with Converting Multiple Rows to Columns and add Column Headers

  1. #1
    Registered User
    Join Date
    08-24-2006
    Location
    Maryland
    Posts
    50

    Question Help with Converting Multiple Rows to Columns and add Column Headers

    Good Afternoon Everyone,

    I'm currently faced with a spreadsheet that has data formatted like this:
    A
    1 RandomRowofData1
    2 RandomRowofData2
    3 RandomRowofData3
    4 RandomRowofData4
    5 RandomRowofData5
    6 RandomRowofData6
    7 RandomRowofData7
    8 RandomRowofData8
    9 RandomRowofData9

    Every 9 rows, a new "set" of data repeats itself (wow, this is so hard to put into words)....

    I need to figure out a way to get the data in column "A", every 9 rows, to transpose itself into 9 separate columns.

    Make sense? I tried doing an OFFSET formula that I found on the support.microsoft website that "sorta" worked...but the formula was written for 4 rows of data and I'm having trouble personlizing it to suit my needs. Ideally, I'd like to add column headers from C1:K1 and paste the formula from cell C2 to K2 and down.

    The formula in question is:
    =OFFSET($A$1,(ROW()-1)*4+INT((COLUMN()-3)),MOD(COLUMN()-3,1))

    Go easy on me...I'm pretty much self taught with my excel knowledge and the way I usually learn complex formulas is by applying them to my needs and dissecting them.

    ...sorry this post is so long, but any help is GREATLY appreciated!!

    Thanks,

    Laura (complex formula noob)

    P.S. I have attached an example of the scenario I'm dealing with. Sheet1 shows the "before" and Sheet2 shows what I want my "after" to look like.
    Attached Files Attached Files
    Last edited by Lmsloman; 10-17-2009 at 09:21 PM. Reason: Problem solved :)

  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: Help with Converting Multiple Rows to Columns and add Column Headers

    Put this in C2 and copy it down and across:

    =OFFSET('This is my Data'!$A$1, ((ROW()-1)*9) - 9 + MOD(COLUMN()-3, 9), 0)
    _________________
    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
    08-24-2006
    Location
    Maryland
    Posts
    50

    Re: Help with Converting Multiple Rows to Columns and add Column Headers

    Thank you so much! I love this message board!

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

    Re: Help with Converting Multiple Rows to Columns and add Column Headers

    I just realized the MOD() wasn't doing anything. Here's a condensed version of the formula:

    =OFFSET('This is my Data'!$A$1,((ROW()-1)*9)+COLUMN()-12,0)

  5. #5
    Registered User
    Join Date
    08-24-2006
    Location
    Maryland
    Posts
    50

    Re: Help with Converting Multiple Rows to Columns and add Column Headers

    Thanks so much!

    I got it to work earlier by tweaking it a bit and used:

    =OFFSET(Data!$A$1,(ROW()-2)*9+INT((COLUMN()-1)),MOD(COLUMN()-3,1))

    It worked like a charm, I even set up a "tool" workbook so my novice user can easily import data into sheet2 and not alter any of the formulas set up on sheet1.

    Sometimes you just need a second pair of eyes

  6. #6
    Registered User
    Join Date
    05-27-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Help with Converting Multiple Rows to Columns and add Column Headers

    Hi all

    I would like to convert huge data of rows into columns.

    I know paste special and transpose work but i'm having huge data.

    Its difficult to do manually.

    Could anyone help me on this please.
    Attached Files Attached Files

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help with Converting Multiple Rows to Columns and add Column Headers

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then satrt your own thread.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

Closed 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