• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy data from file having its path on cells

Chasm

New Member
I have a sheet with 6 file paths (A1 to A6)
I am trying to write a macro that will look on A1 the file path and directly copy the file information and past in a new sheet on my excel. Then repeat the process for the other 5 path/files.
I would prefer to avoid the open file, copy and close file.
Also the files can be in *.csv, *.txt or *.xls extension

If you could point me in right direction I would appreciate.
Thank you
 

vletm

Excel Ninja
Chasm
What would be Your 'the file information' include?
If You run that macro two times You ask to create always six new sheets or how?
 

Marc L

Excel Ninja
If you could point me in right direction I would appreciate.
No direction possible as you forgot the sheets names, the description of source data and expected result !​
Just restart from reading the top page blue banner before to log in or from here :​
 

Chasm

New Member
Hi again.
Thank you for the help given so far.
I thought I had give the idea of what I am looking to do.

So this is it.
I open excel then.
Run Macro "GetFilesToCompare" -> It will open a prompt window for select files (for now it will open 2 times for 1 file each) and past the file path on cell A2 & A3
Then will run second macro "ImportWorkSheet" -> that will copy files information (one sheet on each file), based on their path stored on A2 and A3.

I attach what I have so far.
Did not discover how to close the files that are open to copy the data from.

Thank you for the support you are giving.
 

Attachments

vletm

Excel Ninja
Chasm
Then will run second macro "ImportWorkSheet" -> that will copy files information (one sheet on each file), based on their path stored on A2 and A3.
You would do that without opening file or how?
Do Your .csv and .txt -files also has sheets? if so, then somewhere should give those names or something fixed.

You skipped my second question.

You have there codes. What is missing?
 
Top