+ Reply to Thread
Results 1 to 8 of 8

Data Extraction from numerous workbooks

  1. #1
    Registered User
    Join Date
    03-06-2004
    Posts
    53

    Data Extraction from numerous workbooks

    So here is what i am trying to accomplish. I have approximately more than 50-60 workbooks with 2 sheets each. I am trying to combine 2nd sheet of each workbook in one book. I have attached example sheet. All of the sheets have the same pattern, same placement of data, and same questions. Row1 to Row38 is what i want to extract from all workbooks' sheet 2; the sheet from where i want to extract data is name "CALLS". Sheet 1 is graphs & all, but i am not worried about sheet 1.

    The format of extracted data will have the same background colors. but it will be arranged like top to bottom on one sheet. For example:

    Sheet "CALLS" Row 1 will have Extracted data from 1st workbook, Row 40 will have extracted data from 2nd workbook, Row 80 will have extracted data from 3rd workbook, row 120 will have extracted data from 4th workbook and so on.

    If formatting and cell background color can be kept same, it will be great.

    Thank you
    Attached Files Attached Files
    Last edited by bholabhala; 06-02-2011 at 03:18 PM.

  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: Data Extraction from numerous workbooks

    This macro will do it. Put this into an empty workbook. Edit the macro to list the fPath where the files are stored. If you want to edit the "filter" used in the fName line code to only grab files with specific names, you could do that with something like:
    Please Login or Register  to view this content.
    ...as just a few examples.

    Please Login or Register  to view this content.
    _________________
    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
    03-06-2004
    Posts
    53

    Re: Data Extraction from numerous workbooks

    Is there a way to extract only specific rows? Lets say, i want to extract Row 2-4 then skip 5-8 and then extract 9-12 on every sheet that is being consolidated?
    Last edited by bholabhala; 06-01-2011 at 03:19 PM.

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

    Re: Data Extraction from numerous workbooks

    I suppose so, that sounds a little specific. This is the line of code that is currently copying everything:
    Please Login or Register  to view this content.


    You could replace that with a more specific line of code:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-06-2004
    Posts
    53

    Re: Data Extraction from numerous workbooks

    So this second line will copy everything between row 5 & 8 and also between row 9 & 12?

  6. #6
    Registered User
    Join Date
    03-06-2004
    Posts
    53

    Re: Data Extraction from numerous workbooks

    One last thing that i am wanting to do. The sheet named "Calls" is actually the 2nd sheet on individual workbook. The name of the person, whose data is being copied is on 1st sheet, named "Cover" and its on ROW 7 on all workbooks. Is there a way to copy the row 7 before data from 'Calls' sheet is copied, so it will look something like this:

    Name (Copied from 'Cover')

    followed by

    Copied data from sheet, named "Calls"

    Thank you so much for all your help. You are awesome
    Last edited by bholabhala; 06-02-2011 at 12:44 PM.

  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: Data Extraction from numerous workbooks

    I would hope at this point you were analyzing these codes and the variations we've discussed and started to make "guesses" at how you might add additional lines of code like you're describing.

    Something like so:
    Please Login or Register  to view this content.

    Since you're really only using the "Calls" worksheet variable once, I took it out in this example to make the code even clearer to the eye. You could actually remove the two lines of code at the top of the macro that refer to "ws" since I didn't use it here.
    Last edited by JBeaucaire; 06-02-2011 at 01:29 PM.

  8. #8
    Registered User
    Join Date
    03-06-2004
    Posts
    53

    Re: Data Extraction from numerous workbooks

    lol
    JBeaucaire : I have no clue about the codes & all, i am a noobie to all this You dont know how thankful i am; for all the help you are offering... !

+ 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