+ Reply to Thread
Results 1 to 15 of 15

How to extract 2760 workbooks in a master workbook

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    uae
    MS-Off Ver
    10
    Posts
    6

    How to extract 2760 workbooks in a master workbook

    Hi all,

    I have above 2760 workbooks in one file, they are named differently however they all have the name "lime" associated with them. In each workbook there are values in multiple cells, these cells are:

    1- Merged cells (C5:J5, C7:D7, A8:F8, C9:E9, A10:E10, C11:j11, f9:j9, h10:j10, C28:D28, E28:F28 and G28:H28)
    2-Singular cells G15, G16, G17, G18, to G23,and E31

    The question is will it be possible to extract the said cells for each workbook despite they are named differently but they have"dolo" incorporated with them?
    and if so, will it be possible to list them in a master workbook in rows, where, the first row will the cells extracted from worksheet1 and row 2 will have data extracted from worksheet2 and so on.

    Can anybody help

    Regards,

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    It is certainly possible. I believe you are talking about worksheets, not workbooks. Are there any other worksheets besides the 2760 that you want to extract from? What do you want the data to look like after it's extracted into the master workbook? Do you want it extracted to a separate file, or a new worksheet in the same file?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    uae
    MS-Off Ver
    10
    Posts
    6

    Re: How to extract 2760 workbooks in a master workbook

    No they are workbooks or Excel files, these files contain cells that I want to extract from each file and place in a master excel file. In the master file, I would like the cells to be placed in rows in top of each other; row1 for workbook or file #1, row2 for workbook2, and so on. this will enable me to conduct the statistical analysis I'm in seek for.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    What is the file naming scheme? Are they all in the same folder? I am wondering how to identify which files you want to use.

    My first thought is to use VBA to populate formulas into the cells. To copy values out of the files would involve opening all the files, which could take a long time for that many.

  5. #5
    Registered User
    Join Date
    05-05-2016
    Location
    uae
    MS-Off Ver
    10
    Posts
    6

    Re: How to extract 2760 workbooks in a master workbook

    The file naming is that all the files begin with "Burnt lime report" next comes a date. yes all the files are located in one folder. I'm not familiar with VBA, but by any means (copy, cut, etc.) if I cant extract the data for each file to a master data that will be great. But I heard if a code was generated by VBA it can loop through these multiple files and extract data to the master data, this code is I'm after.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    Attached is a solution that opens each file, copies the data as values into the master. Go to Control and press the button. Data will be extracted to Data.

    2-Singular cells G15, G16, G17, G18, to G23,and E31
    I have assumed this means all the cells in G15:G23.

    I have assumed that the 2760 files have their data in the first worksheet.

    It would be too time-consuming to create files that had data as specified so I tested with files with random data in all cells. If you have problems running this then provide a sample file.

    For purposes of copying, merged cells have only one data value that is considered to be in the top left cell of the merged block. The destination does not have merged cells.

    If you find this takes a long time (it could take over an hour) then the alternate solution is to create formulas that provide external references to the data, which should run in a few seconds.
    Attached Files Attached Files

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    Here is a revision that allows you to choose which method to use to populate the cells. If you select No, then the files will be linked and it takes about 1/15 the time of opening each file.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-05-2016
    Location
    uae
    MS-Off Ver
    10
    Posts
    6

    Re: How to extract 2760 workbooks in a master workbook

    WOW it worked, man your a life save, I really thank you deeply for your help. Allow me to try it more and more & I will update you on the finding.

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    Hi, I am going to bring back our conversation into this thread, to keep everything in one place:

    You are using the option to create external links to the files (answer "No"). This has the benefit of being very fast. If you want values instead of links I can update the code to convert the formulas to values.
    1. columns B, D and H: these all contain dates, will it be possible to tell excel to consider them as dates rather than linked data.
    It would be possible to convert those columns to date values; they appear to be text strings. The only problem is that the format is not consistent. In most cases it is

    dd.mm.yyyy 03.01.2016

    Those are easy, but there are other cases where they try to give more than one day, using different methods:

    03,04.01.2016
    12/13.10.2015
    14&15.03.2016
    15/16/11.2015
    19+20.10.2015
    03.10.2013+04.10.2013

    It is a lot of work to deal with all these variations.
    2. Columns C & G: the cells are of there forms:

    - Number only ( example 35) will it be possible to tell excel that these are numbers rather than linked cell.
    - number attached to text (35Tons) will it be possible to tell Excel this cell to format the number to number and delete any text.
    - Number+Number Text ( 34+35tons) will it be possible to tell excel to add the two numbers and report as number only or split the numbers in adjacent columns and delete the text.
    It's not very hard but again there are a lot of variations. If all data fits into one of these formats then it could be done:

    68.64Tons
    69.82+107.46Tons
    130.58+47.48 T
    129.36+88.14+42.88 T
    150.6+117.44+76.66+50.04 Tons

    Do you need the same thing in Sample Quantity?

    9.95+8.9 Kgs.
    10.1Kgs.
    9.85 +10.4 Kgs.
    8.6+9.95 Kg
    10.15+9.85+9.90 Kg
    10.05+9.95+10.15 Kg
    9.90+9.45 Kgs
    10.05+9.90 Kg
    10.10+9.45 Kgs.
    9.85 Kgs
    9.85+9.95+10.15+9.90 Kg
    9.95+9.80 Kg
    9.95 Kgs.
    10.15+9.95 Kg
    10.05+8.90 Kg
    10.05+10.15+10.0+9.85 Kgs.

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    Here is an example of data conversion based on your sample data file. I have deleted all the data except the data to be converted.

    Original dates are in B, converted dates are in C.
    Original tonnage is in D, converted sums are in E.
    Original quantity is in I, converted sums are in J.

    If you see a "???" it means that the value could not be parsed.

    In the actual file, this would replace the values in the same column. In this example I added new columns so you could see how the data is converted and which values cause problems.

  11. #11
    Registered User
    Join Date
    05-05-2016
    Location
    uae
    MS-Off Ver
    10
    Posts
    6

    Re: How to extract 2760 workbooks in a master workbook

    Many thanks for your prompt reply, I tried to copy the VBA associated with the date and pressed run on VB nothing is happening, I guess I got something wrong? However since I have compiled all the data in one folder and I have organized them in 6 worksheets, will it possible to create another extract to extract these data? Will this process the case easier? Or do you advice other easier method?

    Here the columns are all located in one file with 6 worksheets as follows:

    1. Column A, E, F, U & V: these columns are text, will it be possible to extract as text?

    2. Column B, D, & H: these columns are date, will it be possible to extract as date and to show "???" when the date could not be processed, as your message suggests.

    3. Column C & G : these columns are numbers, will it be possible to extract as a number, in these formats that you suggested :
    68.64Tons
    69.82+107.46Tons
    130.58+47.48 T
    129.36+88.14+42.88 T
    150.6+117.44+76.66+50.04 Tons

    Sometimes it’s written with text in front too (Tonnage: (68.64Tons or your above formats)), will it be possible to disregard the word tonnage too and process as you suggested too? Incase other formats to show "???", so I can manually adjust.

    4. Column I, J, K, L, M, N, O, & P: these columns are numbers, to extract as numbers.

    5. Column R, S, & T: these are numbers, to give one example they can be in the form
    >50 mm = 1.47
    Will it be possible to extract the number after "=" only? In this example to extract the number (1.47) as a number.

    If extracting these sorted data works it will be of great help on my analysis.

    Appreciated deeply your continues help and support.

  12. #12
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    The VBA is a demo that will work in that particular file. It won't work if you simply copy it into another file. If the results in that file are what you are looking for then I can install that code to the master file I sent you earlier.

    I will review your latest post, but this question is growing and it will take some time. #1 is easy. The sample I just provided handles #2 and #3 as you described. I will have to look at the data for #4 and #5 to see what is required.

  13. #13
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    Here is a revision to my original solution. This adds the conversions that you described above. In my demo file, I copied the numbers to a new column and showed "???" when the numbers could not be converted. In the real file, there are no extra columns and I don't want to lose the value, so instead of using "???" I am filling the cells red so you can easily make any manual updates.
    Attached Files Attached Files

  14. #14
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,980

    Re: How to extract 2760 workbooks in a master workbook

    Hi, just checking see if this last update is helpful.

  15. #15
    Registered User
    Join Date
    05-05-2016
    Location
    uae
    MS-Off Ver
    10
    Posts
    6

    Re: How to extract 2760 workbooks in a master workbook

    Hi, sorry for the belated reply as I was graphing these huge a mount of data to draw statistical inferences. The software is great and your help is and will always be appreciated. Thank you very much for your time and effort.

+ 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. extract cell data from one workbook to master workbook
    By mikey141 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-19-2015, 11:05 PM
  2. Split and Extract data from master workbook into several other workbooks
    By kezzyk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-29-2013, 01:00 AM
  3. Replies: 5
    Last Post: 02-25-2013, 08:21 AM
  4. extract name of workbooks from file to master workbook
    By gwyn_123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2013, 10:58 AM
  5. VBA macro to extract data from multiple workbooks into a master workbook
    By garfield0304 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2013, 06:24 PM
  6. Extract data from different workbooks into one master workbook
    By bkutkut in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2011, 12:52 PM
  7. Extract data from multiple workbooks to master
    By unley in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2010, 06:22 AM

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