From: Maxi on
Dear Friends

I have 1 blank excel file and around 200+ text files in the folder c:
\stock.

Here is a sample data in each text file. Name of the file
PARAMOUNT.TXT

PARAMOUNT.NS,20100226,09:01:00,521.00,521.40,517.20,519.00,1677
PARAMOUNT.NS,20100226,09:02:00,520.00,520.90,520.00,520.00,1872
PARAMOUNT.NS,20100226,09:03:00,519.25,519.95,518.00,518.70,1783
PARAMOUNT.NS,20100226,09:04:00,518.00,518.00,516.05,517.50,859
PARAMOUNT.NS,20100226,09:05:00,517.50,518.00,516.70,516.70,1466
PARAMOUNT.NS,20100226,09:06:00,517.80,519.00,517.00,519.00,1191

Is it possible to write a macro that will take data from these text
files for all the companies at a specific time as per user request?
For example, I want to retrieve data at 09:05 from all the files in
one excel file. If a data is not available at 09:05 then take data for
the next minute 09:06 or 09:07 etc.

Thanks