C
carl
I have a some xlsx files located here: J:\Projects\ORF.
Is there a way to extract the 5th row of each file at this location ?
Is there a way to extract the 5th row of each file at this location ?
Workbooks(files) don't have rows.
Each workbook is comprised of one or more worksheets............these worksheets
have rows.
You must be more specific with your description.
But yes..............you can extract data from each of the files(workbooks) in
that folder if you know which worksheet contains the required row.
Check out Ron de Bruin's site.
http://www.rondebruin.nl/tips.htm
Browse through the codes you find under his Copy/Paste/Merge Examples.
Note the "merge data from all workbooks in a folder"
Ron has also supplied an Add-in you could download.
Gord Dibben MS Excel MVP
- Show quoted text -
In that case have a look at Ron's code here.
http://www.rondebruin.nl/summary2.htm
Gord
- Show quoted text -
Thanks. I looked at my path again. Turns out the workbooks are all
located in separate folders.
The code you pointed me too looks like I need to select all the
workbooks before running it - is that correct ?
You would need to fully qualify each folder path for each file. You
could, if NOT too many, even use a formula- Hide quoted text -
- Show quoted text -
Thanks. Unfortunately, there are 223
More info perhaps. You have 223 files in ________(how many) folders
and do you know the files in each folder and the sheet in the file to
get the row????????????????- Hide quoted text -
- Show quoted text -
the files have the same name. Each file (workbook) contains 1 sheet
named "ORF_Charge". In this sheet, the data I am trying to extract is
in row 5.
Thanks for helping.
I have 223 files in 223 folders. Each folder only contains 1 file. All
the files have the same name. Each file (workbook) contains 1 sheet
named "ORF_Charge". In this sheet, the data I am trying to extract is
in row 5.
I sincerely hope you inherited this storage system from a predecessor.
If not, what were you thinking?
Did you ever hear of "shared files" where one master workbook is kept up-to-date
by multiple users?
Can you get a list of all the folders and paths to those folders?
Can you get that list into a worksheet in a new workbook?
We should be able to use a loop to iterate through that list of path/folders and
pull row 5 from each ORF_Change worksheet since all workbooks have the same
name.
The trick is to get into the 223 folders.
Gord
- Show quoted text -
Don's suggestions could make it easier but changing the names of 223 files in
223 folders may be an onerous task.
If you could get J:\Projects\ORF\Meeds\xlsx\005\ and all other paths into a
list a loop through could be done although getting the list may also be onerous.
After all, the workbook name............ORF.xls...........and the worksheet
ORF_Change do not vary from folder to folder so what the code would do isloop
through the path names pulling data from each workbook into a sheet in your
Master workbook
Gord
- Show quoted text -
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.