+ Reply to Thread
Results 1 to 7 of 7

vertical transposition macro

  1. #1
    Registered User
    Join Date
    08-19-2010
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    97

    vertical transposition macro

    ok, so i have what i believe to be the mother of all transposition problems. included is an example. basically, i need all the data from AG:AX to transpose vertically, but it also needs to link to ranges defined in columns F, G and I. Attached is what the columns will always look like and where the data will always be.

    I want a macro, and at the front of the macro should be a code to convert all text to numbers otherwise the info will not feed to the final pivot table.

    I had some theories about groupings and arrays, but i'm worried that the formulas will slow the sheet down as the files can often be over 40,000 lines.

    the tricky part is that the data that links the info, (i.e columns F, G and I) will need to copy and paste itself down to line up with columns AG:AX once they are transposed.

    Make sense?
    Attached Files Attached Files
    Last edited by juniperjacobs; 01-21-2011 at 02:06 PM. Reason: 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: vertical transposition macro

    Try this:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    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-19-2010
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: vertical transposition macro

    look at your never ceasing to amaze! it's working except it's not auto filling column I after the transposition, but it's doing it for F and G. I was trying to find that part in the code to tell it myself but i'm not seeing it. Sorry to be so daft.

  4. #4
    Registered User
    Join Date
    08-19-2010
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: vertical transposition macro

    also, i just ran it, and i think my example wasn't clear, it was for one style as a test, but in reality, the sheet i'll be working with will have hundreds of styles so the macro will need to read the whole worksheet. i'm attached a more flushed out example for your ref. you'll notice the columns are a little different, i revised the code to work with this report... which will be the report format used from now on.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-19-2010
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: vertical transposition macro

    figured this part out: look at your never ceasing to amaze! it's working except it's not auto filling column I after the transposition, but it's doing it for F and G. I was trying to find that part in the code to tell it myself but i'm not seeing it. Sorry to be so daft.

    So, i just need the code to loop through the whole worksheet.

  6. #6
    Registered User
    Join Date
    08-19-2010
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: vertical transposition macro

    never mind, solved, it stops when it sees blanks, i get it now, thanks so much for your help!

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

    Re: vertical transposition macro

    Glad to help! Looks like you ran most of the way on your own, awesome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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