getting data from all files from a folder.

  • Thread starter Thread starter J_J
  • Start date Start date
J

J_J

Hi,
I am using a formula such as
=VLOOKUP(A18;'C:[NF1.xls]Sheet1'!$B$15:$F$41;3;FALSE)*((AND(C6='[Not
Fiþleri.xls]Sheet1'!$F$8)))
to retrieve data from an excel file to my main working excel file. The
referance data are in A18 and C6. The data in A18 is always the same but the
data in C6 will differ for the range C6:Z6.
I need to generelize this process, getting data from all files from within a
folder (and retrieving data from a range of columns) via a macro process.
Can you suggest a stucture for it?
p.s.: I can be more spesific if asked...
TIA

J_J
 
Just have your macro construct and write the formulas you need.

You can identify the files in a folder using the DIR command. See the vba
help for a code sample.
 
Thanks Tom,
OK but let me start from the very beginning.
how do I add the the two "conditions" into my macro?. (If data in A18 and C6
is there?)
J_J



Tom Ogilvy said:
Just have your macro construct and write the formulas you need.

You can identify the files in a folder using the DIR command. See the vba
help for a code sample.
--
regards,
Tom Ogilvy


J_J said:
Hi,
I am using a formula such as
=VLOOKUP(A18;'C:[NF1.xls]Sheet1'!$B$15:$F$41;3;FALSE)*((AND(C6='[Not
Fi?leri.xls]Sheet1'!$F$8)))
to retrieve data from an excel file to my main working excel file. The
referance data are in A18 and C6. The data in A18 is always the same but
the
data in C6 will differ for the range C6:Z6.
I need to generelize this process, getting data from all files from
within a
folder (and retrieving data from a range of columns) via a macro process.
Can you suggest a stucture for it?
p.s.: I can be more spesific if asked...
TIA

J_J
 
if not isempty(Range("A18")) and not isempty(Range("C6")) then

--
Regards,
Tom Ogilvy


J_J said:
Thanks Tom,
OK but let me start from the very beginning.
how do I add the the two "conditions" into my macro?. (If data in A18 and C6
is there?)
J_J



Tom Ogilvy said:
Just have your macro construct and write the formulas you need.

You can identify the files in a folder using the DIR command. See the vba
help for a code sample.
--
regards,
Tom Ogilvy


J_J said:
Hi,
I am using a formula such as
=VLOOKUP(A18;'C:[NF1.xls]Sheet1'!$B$15:$F$41;3;FALSE)*((AND(C6='[Not
Fi?leri.xls]Sheet1'!$F$8)))
to retrieve data from an excel file to my main working excel file. The
referance data are in A18 and C6. The data in A18 is always the same but
the
data in C6 will differ for the range C6:Z6.
I need to generelize this process, getting data from all files from
within a
folder (and retrieving data from a range of columns) via a macro process.
Can you suggest a stucture for it?
p.s.: I can be more spesific if asked...
TIA

J_J
 
Thanks. I'll try that and get back here if get stucked...
Best wishes
J_J

Tom Ogilvy said:
if not isempty(Range("A18")) and not isempty(Range("C6")) then

--
Regards,
Tom Ogilvy


J_J said:
Thanks Tom,
OK but let me start from the very beginning.
how do I add the the two "conditions" into my macro?. (If data in A18 and C6
is there?)
J_J



Tom Ogilvy said:
Just have your macro construct and write the formulas you need.

You can identify the files in a folder using the DIR command. See the vba
help for a code sample.
--
regards,
Tom Ogilvy


:

Hi,
I am using a formula such as
=VLOOKUP(A18;'C:[NF1.xls]Sheet1'!$B$15:$F$41;3;FALSE)*((AND(C6='[Not
Fi?leri.xls]Sheet1'!$F$8)))
to retrieve data from an excel file to my main working excel file. The
referance data are in A18 and C6. The data in A18 is always the same but
the
data in C6 will differ for the range C6:Z6.
I need to generelize this process, getting data from all files from
within a
folder (and retrieving data from a range of columns) via a macro process.
Can you suggest a stucture for it?
p.s.: I can be more spesific if asked...
TIA

J_J
 

Ask a Question

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.

Ask a Question

Back
Top