LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Reading data from other files

I already posted this a few weeks ago, no ideas anyone?:

I have several files all identical in format, in a single target directory,
single sheets with different names, e.g.:
foc_1200.xls
foc_1250.xls
foc_1300.xls
foc_1350.xls
foc_1400.xls

I want to import the complete contents of each file into one workbook, with
a seperate worksheet for each named as follows:
-100
-50
0
+50
+100
where the contents of foc_1200.xls would go into sheet "-100", foc_1250.xls
into sheet "-50" etc, overwriting whatever is there.
I would like to do this using a macro where I only need to input the name of
the first file, in this case foc_1200.xls, and maybe the offset (50) to the
next file and have the macro basically cut and paste instead of having to do
this manually.
There would not necessarily be an offset of 50, it might be 100, in which
case I need the offset maintained in the destination workbook, i.e. if I
instead have three files in the target folder with a 100 offset:
foc_1415.xls
foc_1515.xls
foc_1615.xls
then the data should be pasted into only worksheets -100, 0 and +100,
leaving sheets "-50" and "+50" unchanged. (or blank if that's easier)
The offset would always be constant, but it might be 50 or 100 or an
arbitary number. I would enter that manually.
Any ideas?

 
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
Reading data arrays from multiple data files in excel Hankjam[_2_] Excel Discussion (Misc queries) 0 February 7th 08 08:29 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 data from text files in VBA Arne[_3_] Excel Programming 3 January 27th 04 10:07 AM


All times are GMT +1. The time now is 08:52 AM.

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"