+ Reply to Thread
Results 1 to 14 of 14

Transposing a column hundreds of times without doing it manually

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Transposing a column hundreds of times without doing it manually

    Hello all,

    I have a question as to how I can transpose lots of data that's stacked ontop of each other, into rows that fit into their general categories. In the attached below, I have column A, and Column B. I want the data to be transposed by "looking up" if you will off column A, than posting the B value into its transposed area. Without manually changing the Array each time, I can't get this to work with a Vlookup, I was wondering if there was another way via maybe a conditional index, or something that would work? Any help is appreciated.

    Thanks,

    Math

    Copy of AWP corrugated specs.xlsm

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Transposing a column hundreds of times without doing it manually

    try this in B2, copied down and across...
    =INDEX($A$9:$AX$73,MATCH(B$1,$A$9:$A$73,0),ROW(A2))

    it looks like your data goes as far as column AX, if it goes beyond that, adjust bthe range accordingly
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transposing a column hundreds of times without doing it manually

    Hey FDibbins,

    I appreciate the help, but since the columns aren't all the same length that doesn't seem to work. If you try it on the sheet I attached above, it just seems completely scrambled and not in order at all.

    Thanks,

    Math

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Transposing a column hundreds of times without doing it manually

    Hi Math,
    If the columns aren't the same length, are the words in Col A the same words? Are they in the same order? If they aren't in the same order then there is a problem as some of the words in Col A are the same. We need some kind of standard from which to formulate a rule to transpose smartly.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transposing a column hundreds of times without doing it manually

    Hey Marvin,

    Yes the words in column A are in the same order, most are exactly the same, the real issue is sometimes documents have been edited so they're "revised and revise" which adds 2 rows in between that aren't usually there. That being said, in my first post I alluded to some way attaching the word in column A, like a V Lookup transposed into the rows. The problem with V lookups is I would have to change the Array for each row in order for it to work, which would be just as tedious as copying and than transposing each document.

    Thanks,

    Math

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Transposing a column hundreds of times without doing it manually

    It seems to me you will need a list of all possible words in Col A to do this problem. ALSO - if any of the two words/cells have the same word then the "match the name" routine will fail. You have two "$File" near the top which keeps this method from success.

    You also have data in Col C and beyond. What should be done with this data?

  7. #7
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transposing a column hundreds of times without doing it manually

    Hey Marvin,

    I am not sure what you mean by data in Column C. There is data in the first few rows in that spreadsheet which is an example of what i want it to look like. There will be mutiple of the same words in column A since it's just a massive list of documents. For example, these are the words that need to be matched and transposed and looked up for the parrell column "B" item

    Please Login or Register  to view this content.
    So, all of those get repeated hundreds of times, as that is the template for one of our documents, when I pulled the documents out of the source system it looks like you see on the screen, just 2 columns of massive data. I'd like that to be transposed in a nice fashion as you can see the first 6 or 7 rows. Spaces are acceptable as well if they need to stay there. Does that make sense?

    Thanks,

    Math

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Transposing a column hundreds of times without doing it manually

    Mathias, I have tested my formula again, and it works correctly in every instance. however, when i compare it to the sample answer you provided, many of your entries do not match what is in the data in col A:B see the attacked

    I also just noted that the table you have in A9:AX73 is repeated again many times below, and in each table, rows such as have multiple column entries in each table. what is your expectation for results in that situation?

    I think you need to re-think the layout of your data, to make what you want feasable
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transposing a column hundreds of times without doing it manually

    Hey FDibbins,

    As you can see in your attached, the yellow is what I want to get to. The column headers for the yellow correspond directly with the verticals in column A, only repeated over and over again, because each document starts at "OrginalModTime" and ends at "Graphics".

    Basically I just want something that looks like the yellow, by transposing column B using smart matching on column A. Does that make sense?

    And unfortunetly there's no other way to pull the data...it's out of a tool called "Lotus Notes" which is older then myself =\

    Thanks,

    Math

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Transposing a column hundreds of times without doing it manually

    i can vaguely remember Lotus Notes, it was good in its day

    i tried changing the formula to go all the way down to 2744, but you still have data in your sample that does not appear in the "data base"

    change my formula to
    =IF(INDEX($A$30:$AX$2744,MATCH(B$1,$A$30:$A$2744,0),ROW(A2))="","",INDEX($A$30:$AX$2744,MATCH(B$1,$A$30:$A$2744,0),ROW(A2)))
    and then look at the value you have in B19 and AZ 19. that value of 202708 is nowhere in any of your tables?

  11. #11
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transposing a column hundreds of times without doing it manually

    Ah I see the issue.

    The ones that are in the yellow column are already done, so we deleted the data. I can see how that could cause much confusion. Does that make sense? There won't be any of the data below, as that's all stuffed we haven't done yet.

    Thanks,

    Math

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Transposing a column hundreds of times without doing it manually

    ok yes that would cause a lil bit of confusion. have you tried my revised forula yet?

  13. #13
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transposing a column hundreds of times without doing it manually

    Hey FDibbins,

    Sorry on the delayed response.

    I just tried the updated forumla and am running into the same problem, it shows the first line fine (Which is great!) but it won't show subsequent lines, so it's basically acting moreas a vlookup than anything...The only thing that seems to update is the history column. Do you know why this could be? I see its pulling in stuff from the C and D column which can just be ignored, I only need stuff from the B column.

    Thanks,

    Math

  14. #14
    Registered User
    Join Date
    12-13-2012
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Transposing a column hundreds of times without doing it manually

    Am I allowed to bump this?

+ 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