extracting whole range of sheet data

  • Hi,


    The following code loops through a folder with many workbooks, extracts the value of each cell 'A1', and then writes each workbook name in column A, and the corresponding cell value into column B of a new workbook.


    How can I modifiy this code to extract a whole range of data?
    Instead only extracting on cell value, I want to gather a specific rows, e.g.
    -B6:M9 into a new target sheet, named e.g. 'data'



  • one step further


    Hi,


    I have the following code. It extracts a data range of different xls files and writes them in a specific range of the current workbook.
    Problem: data is being overwritten, i.e. only the data of the last opened workbook is displayed in the target worksheet, instead of collecting all available data in different rows. Also, there are messages displayed when each workbook is being openend (update?/macros?), and I don't know how to turn them off, i.e. set them automatically to 'yes'.



  • Re: extracting whole range of sheet data


    This is untested, I have changed Formula to Value because I don't think you are copying a Formula.


  • Re: extracting whole range of sheet data


    Hi!
    I have tested the code, what it does is that it opens the three xls files in the folder. In the end I can see in the current worksheet that the actual macro VBA Code is being copied three times into the worksheet...


    Cheers
    Juergen

  • Re: extracting whole range of sheet data


    Hi,
    I have solved this problem using the following code:


    Cheers
    Juergen

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!