Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default MACRO FOR READING MANY FILES

Hi,

I'm wondering if this can be done:

I have about a 100 files which are identical in format but have data for
different dates...

Is there a way to write a macro that will open and search each of the those
100 files, and copy rows which contain "X" or "Y" in Column Q into a new
spreadsheet?

Would appreciate any help.

Thank you,

H
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default MACRO FOR READING MANY FILES

Hi

You can find examples here
http://www.rondebruin.nl/copy3.htm

You can filter on the Q column then and copy the visible data
If you need more help post back



--
Regards Ron de Bruin
http://www.rondebruin.nl


"hfazal" wrote in message ...
Hi,

I'm wondering if this can be done:

I have about a 100 files which are identical in format but have data for
different dates...

Is there a way to write a macro that will open and search each of the those
100 files, and copy rows which contain "X" or "Y" in Column Q into a new
spreadsheet?

Would appreciate any help.

Thank you,

H



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default MACRO FOR READING MANY FILES

is there any file requirements? when I try my file on the ado test I'm
getting an error...

the file, name, sheet name or range is invalid of: F:\....

Thanks
Hussein

"Ron de Bruin" wrote:

Hi

You can find examples here
http://www.rondebruin.nl/copy3.htm

You can filter on the Q column then and copy the visible data
If you need more help post back



--
Regards Ron de Bruin
http://www.rondebruin.nl


"hfazal" wrote in message ...
Hi,

I'm wondering if this can be done:

I have about a 100 files which are identical in format but have data for
different dates...

Is there a way to write a macro that will open and search each of the those
100 files, and copy rows which contain "X" or "Y" in Column Q into a new
spreadsheet?

Would appreciate any help.

Thank you,

H




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default MACRO FOR READING MANY FILES

If your workbook have a password to open ADO is not working
Use the other examples on my site that open the files (read the Tips for the workbook.open)

--
Regards Ron de Bruin
http://www.rondebruin.nl


"hfazal" wrote in message ...
is there any file requirements? when I try my file on the ado test I'm
getting an error...

the file, name, sheet name or range is invalid of: F:\....

Thanks
Hussein

"Ron de Bruin" wrote:

Hi

You can find examples here
http://www.rondebruin.nl/copy3.htm

You can filter on the Q column then and copy the visible data
If you need more help post back



--
Regards Ron de Bruin
http://www.rondebruin.nl


"hfazal" wrote in message ...
Hi,

I'm wondering if this can be done:

I have about a 100 files which are identical in format but have data for
different dates...

Is there a way to write a macro that will open and search each of the those
100 files, and copy rows which contain "X" or "Y" in Column Q into a new
spreadsheet?

Would appreciate any help.

Thank you,

H






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MACRO FOR READING MANY FILES


Dear fazal

in the below link you can get how to open all the sheets in a given
folder.
http://www.ozgrid.com/forum/showthread.php?t=21322

i guess this will be solution to your first step of the problem.

Regards
Raza


--
RAZA
------------------------------------------------------------------------
RAZA's Profile: http://www.excelforum.com/member.php...o&userid=34186
View this thread: http://www.excelforum.com/showthread...hreadid=539270



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Multiple Files BadBoy Excel Worksheet Functions 5 January 15th 10 06:26 PM
Please Help for a macro reading files not in sequence Francesco Excel Discussion (Misc queries) 8 April 15th 06 06:13 PM
Reading dbf files Luis Verme Excel Discussion (Misc queries) 6 July 1st 05 01:32 AM
Reading dbf files Luis Verme Excel Programming 6 July 1st 05 01:32 AM
Reading all files in a folder H. Rye Excel Programming 1 January 20th 04 02:15 PM


All times are GMT +1. The time now is 10:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"