+ Reply to Thread
Results 1 to 7 of 7

transpose across workbooks

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    transpose across workbooks

    Hi everyone whos knowledge of excel I wish I had,

    I hesitated to post as I have so far sound some similar posts that I am about to make, and macros that could come close but I just don't have the knowledge to de-bug and tweak for my own purposes.

    The challenge, I need to convert the first column of data in a large amount of workbooks with multiple sheets(tabs) into one workbook with multiple tabs. It immediately gets complicated when the column range varies for each set of workbooks. It will always begin at A7 for every sheet in every workbook, but some columns are shorter than others. Now each workbook with multiple tabs needs to have the data in column A copied and transposed (turn it from column into a row) to another "merged sheet" inside of the "merged workbook" which will contain one tab per set of workbooks. And each row in the tabs of the final workbook ("merged workbook") will have the data from each set of input workbooks. So workbook set1 = tab1 inside the merged workbook. This may likely mean that a seperate macro or formula or process is needed for each set, which is totally fine because it cuts so much manual tedium.

    I hope I'm clear so far and I hope this is possible, when I say workbook sets, it's just 4 or 5 workbooks (with multiple tabs) copied many times, but the data contained within them all is unique. In the merged workbook the first row will be pre-poulated with headings ready for the data to be slotted into row2 and below. Now if I may confuse you more, the data from each tab from the input workbooks needs to be continuous when it is displayed in the merged workbook. i.e. one long continuous row of data where cells A2 to H2 would all be from tab1 of an input sheet, I2 to M2 would be the data from the next tab. And so on and so forth. One row for one inputsheet, one tab for one set of inputsheets.

    If you've read this far thank you very much and I am a confused fellow so I'll welcome any questions to clarify what I'm after If I've confused some of you helpful sorts. Much longer post than I anticipated. THE END

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: transpose across workbooks

    Welcome to the forum IcedMrT,

    Too many words mate!

    Is it possible to post a sample of the Master sheet and one of the sheets you want to pull data from.

    That way, we might get a better image of what you need.

    Regards,

    David

    Please remember, your request is clearer if you attach a sample workbook.
    - Click on Go Advanced and click on the Paper Clip.
    When you reply please make it clear WHO you are responding to by mentioning their name.
    If this has been of assistance, please advise. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.
    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: transpose across workbooks

    Heya David A Coop.

    I know, sorry bout all the words . Helped to write it all down (for me at least :p). I've attached some examples of the input and desired output.

    It's worth noting a few things different in the examples, firstly I will be doing this in EXCEL 2007. Secondly the steps are not actually numbered in the real version so I don't expect the steps to somehow order themselves in the final output, and that's totally fine. The type of input workbook is actually .xlsm and yes the tab names don't have any relation to them. Hope I didn't miss out anything there.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: transpose across workbooks

    MasterSheet.xlsm

    I have attached a sample macro.

    When you start it, you will be asked to identify the file from which you will get the data. Once you select the file, it will be copied across the the Master Sheet tab you are currently on.

    Regards,

    David



    When you reply please make it clear WHO you are responding to by mentioning their name.
    If this has been of assistance, please advise. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.
    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

  5. #5
    Registered User
    Join Date
    01-29-2014
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: transpose across workbooks

    Thanks I'll let you know how it goes when I have a chance to test it this coming Monday. Managed to get a hardcoded version to work at least partway, if this macro puts the info in the mastersheet tab I'm currently on, that would certainly cut down on the need to replicate the same macro and alter the cell & name references.

    Will edit this post with the result, running it as-is got an error at this following line, will explore later and will share my inelegant (but working )solution when I have the chance.
    Please Login or Register  to view this content.
    Last edited by icedMrT; 01-31-2014 at 02:02 AM.

  6. #6
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: transpose across workbooks

    Hi,

    Change the MasterSheet.xlsx to MasterSheet.xlsm.

    When I was testing, it didn't seem to matter, but I had the save the workbook as macro enabled, and didn't think to change the code.

    DAC

  7. #7
    Registered User
    Join Date
    01-29-2014
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: transpose across workbooks

    Yep that worked, although I guess my master sheet example was not clear, as I have many many workbooks to merge, each workbook of the same type as it gets added in needs to go in the row below the prvious one so as not to overwrite the data. So the first tab in the mastersheet will eventually have some 30+data rows with the top row being the headings filled by all the type1 workbooks.
    Let me throw up my rather inelegant solution that needs one macro for each worokbook type, i.e. it's a hardcoded solution.

    Please Login or Register  to view this content.
    I realise I should have chosen a shorter example as not all of them have this many tabs :p
    The things highlighted in red will always be different and where a line says "Range(Cells(no, 21), Cells(no, 22)).Select" The numbers represent the column number range for the copied items to be pasted into.

    This code opens up every file in a folder (coded at the very top), and copy pastes the provided ranges into the mastersheet, then closes the input workbook, adds 1 to the row number, and then moves onto the next. The Masterspreadsheet is open while this macro runs.

    Welcome any feed back on how to tidy this up or jsut have ONE macro and select the input location.
    Last edited by icedMrT; 02-05-2014 at 07:25 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need help with merging data from many workbooks to one with data to transpose
    By cmce in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-24-2013, 07:28 PM
  2. [SOLVED] Transpose: How can I copy a list and transpose it but leaving 3 cells in between each item
    By cocolete in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-11-2012, 10:01 AM
  3. Macro to copy column from multiple workbooks and transpose in active book
    By kishen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2011, 05:48 AM
  4. Replies: 2
    Last Post: 02-19-2007, 04:53 PM
  5. [SOLVED] I WANT TO TRANSPOSE LINKS, AS WE TRANSPOSE VALUES
    By Umair Aslam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-22-2005, 09:05 AM

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