ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   getting data from all files from a folder. (https://www.excelbanter.com/excel-programming/359227-getting-data-all-files-folder.html)

J_J[_2_]

getting data from all files from a folder.
 
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



Tom Ogilvy

getting data from all files from a folder.
 
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" wrote:

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




J_J[_2_]

getting data from all files from a folder.
 
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" wrote in message
...
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" wrote:

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






Tom Ogilvy

getting data from all files from a folder.
 
if not isempty(Range("A18")) and not isempty(Range("C6")) then

--
Regards,
Tom Ogilvy


"J_J" wrote in message
...
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" wrote in message
...
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" wrote:

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








J_J[_2_]

getting data from all files from a folder.
 
Thanks. I'll try that and get back here if get stucked...
Best wishes
J_J

"Tom Ogilvy" wrote in message
...
if not isempty(Range("A18")) and not isempty(Range("C6")) then

--
Regards,
Tom Ogilvy


"J_J" wrote in message
...
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" wrote in message
...
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" wrote:

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











All times are GMT +1. The time now is 02:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com