+ Reply to Thread
Results 1 to 10 of 10

Move data from horizontal to vertical

  1. #1
    Registered User
    Join Date
    10-05-2005
    Posts
    34

    Move data from horizontal to vertical

    HTML Code: 

    How do I get the get the lines to transpose vertically without have to do each manually?

    So for example I would like to see the data read like this.

    TORI TORIE
    TORI VICKEY
    TORI VICKI
    TORI VICKIE
    TORI VICKY
    TORI VICTORIA

    ETC...




    Thanks for any input ahead of time.

  2. #2
    Registered User
    Join Date
    11-17-2006
    Posts
    34
    Select and copy the cells you want to change to vertical or horizantal.
    Go paste special and check the transpose checkbox and OK.

    Should do it

    Works both ways

    ResulG

  3. #3
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by JustMe602
    HTML Code: 

    How do I get the get the lines to transpose vertically without have to do each manually?

    So for example I would like to see the data read like this.

    TORI TORIE
    TORI VICKEY
    TORI VICKI
    TORI VICKIE
    TORI VICKY
    TORI VICTORIA

    ETC...




    Thanks for any input ahead of time.
    Hi,


    In I1 put

    =OFFSET($A$1,INT((ROW()-1)/6),0)

    in J1 put

    =OFFSET($A$1,INT((ROW()-1)/6),MOD(ROW()-1,6))

    formula fill these downwards until you run out of data.

    Copy columns I and J and Paste Special = Values.

    Remove any unwanted columns

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

  4. #4
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    Transpose

    There is an array transpose function called "TRANSPOSE()" in the "Lookup and Reference" function group.

    Select a range of cells the correct size and shape to fit the transposed data,
    Type in the function TRANSPOSE(AQ1234:ZY4321),
    {replace the above fictitious addresses with the addresses of the top left and bottom right cells of the array you want to transpose}
    Press [Ctrl Shift Enter]
    {to enter it as an array function which covers the entire selected range of cells},

    Mark.

  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Mark@Work
    There is an array transpose function called "TRANSPOSE()" in the "Lookup and Reference" function group.

    Select a range of cells the correct size and shape to fit the transposed data,
    Type in the function TRANSPOSE(AQ1234:ZY4321),
    {replace the above fictitious addresses with the addresses of the top left and bottom right cells of the array you want to transpose}
    Press [Ctrl Shift Enter]
    {to enter it as an array function which covers the entire selected range of cells},

    Mark.
    True Mark, but the example given indicates that the first word is repeated down the 6 other transposed values (per current row), thus each current row becomes 6 rows of 2 data items, the first being a repeat.

    Well, . . I hope I read it correctly (someone will probably point out that TORI means 'row' or something)

    hth
    ---

  6. #6
    Registered User
    Join Date
    10-05-2005
    Posts
    34
    Thanks for all the responses, thus far.

    Okay I think the "offset" function seems to be working the best for what I am looking for. With one exception. I have about 1200 rows of this situation with the rows having a different number columns (set of data) associated with each different lines.

    So Tori has 6 varations but
    Say John might have 13 varations thus 13 columns.

    Any help on how to solve this problem?

  7. #7
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517
    You would obviously have to move columns I, J to give extra room...

    You could perhaps use the COUNT() function to determine how many combinations there are.

    Replace the 6 in Bryan's formulas by the number of combinations.

    Assume you have the number of combinations saved in cell Z1,

    Bryan's formulas become:

    =OFFSET($A$1,INT((ROW()-1)/$Z$1),0)
    =OFFSET($A$1,INT((ROW()-1)/$Z$1),MOD(ROW()-1,$Z$1))

    Mark

  8. #8
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Mark@Work
    You would obviously have to move columns I, J to give extra room...

    You could perhaps use the COUNT() function to determine how many combinations there are.

    Replace the 6 in Bryan's formulas by the number of combinations.

    Assume you have the number of combinations saved in cell Z1,

    Bryan's formulas become:

    =OFFSET($A$1,INT((ROW()-1)/$Z$1),0)
    =OFFSET($A$1,INT((ROW()-1)/$Z$1),MOD(ROW()-1,$Z$1))

    Mark
    HI Mark,

    Almost, the second part needs to be

    =OFFSET($A$1,INT((ROW()-1)/$Z$1),MOD(ROW(),$Z$1+1))

    to allow for the first in a set to be a 'none-line'

    the 'short' sets produce zero entries, but they can easily be filtered out when required.

    Z1 needs to be the column number of the last column of data, the sample showed 6, but with only 1200 lines, then, after the Text to Columns, in a row after 1200 a simplle =COUNTA(A1:A1200) formula filled sideways will show where the data ends.

    The formula, as Mark said, will need to be in a column after the last data item, AA and AB look good.

  9. #9
    Registered User
    Join Date
    11-17-2006
    Posts
    14
    Wow, I was just going to enter the exact same question. Eerie.

  10. #10
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mattlazarus
    Wow, I was just going to enter the exact same question. Eerie.
    Hi,

    watch the variation on this question, where the first item does not count as a row, but is the column A entry for all related rows.

    ---

+ 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