Link to home
Start Free TrialLog in
Avatar of Adam Elsheimer
Adam ElsheimerFlag for Germany

asked on

VBA that opens file in a directory and extracts certain columns beginning at a certain row

Have to extract 5 files. Each file has ca. 50000 rows. Say, browse file directory, all columns A-AZ, start extracting with e.g. A10 etc., create a new wb.  I need a flexible solution.



Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Adam Elsheimer


Thank you so much for your speedy assistance, your tech support is truly appreciated.

It works excellent.

One question: Where are the header row of the table?

I changed the range as follows but header row is not show in the  ws.

With mybook.Worksheets(1)
                    LastR = .Range("A" & Rows.Count).End(xlUp).Row
                    Set sourceRange = .Range("A2:AZ" & LastR)
                End With

Open in new window


Thank you for your fast answer and the very professional completion of my inquiry!
You're Welcome Adam! Glad I was able to help.

Sorry for late reply. Did you came right?
Many thanks for the fast and competent help and data rescue Shums!  I will copy the header column manually. It is eveything fine. Thanks to all Experts here for helping newbies.