View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Maxi[_2_] Maxi[_2_] is offline
external usenet poster
 
Posts: 94
Default Collating stock market data

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.2 0,519.00,1677
PARAMOUNT.NS,20100226,09:02:00,520.00,520.90,520.0 0,520.00,1872
PARAMOUNT.NS,20100226,09:03:00,519.25,519.95,518.0 0,518.70,1783
PARAMOUNT.NS,20100226,09:04:00,518.00,518.00,516.0 5,517.50,859
PARAMOUNT.NS,20100226,09:05:00,517.50,518.00,516.7 0,516.70,1466
PARAMOUNT.NS,20100226,09:06:00,517.80,519.00,517.0 0,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