Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Importing data from several existing workbooks into main workbook

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?
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
Importing Data from a pre-existing spreadsheet Todd Helmick Excel Discussion (Misc queries) 2 July 23rd 09 01:13 PM
Importing data into existing worksheet Engels New Users to Excel 1 January 5th 07 01:54 PM
Cannot maximize an existing workbook in the excel main window. jimmy Excel Discussion (Misc queries) 2 August 1st 06 04:52 AM
Importing data into an existing workbook Bob Reynolds Excel Worksheet Functions 2 April 15th 05 03:43 PM
Importing text file into an existing excel workbook. Juan Melero Excel Programming 3 December 16th 03 12:19 AM


All times are GMT +1. The time now is 10:17 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"