LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Jack Sons
 
Posts: n/a
Default put files together

Hi all,

I have in a directory "summary" some 800 files with a number for a name,
like 8, 23, 44, 124, 2045 up to somewhere in the 2500's. There is no list of
all those file names.

Each file is a workbook with only one sheet called "ABCD". I know that the
last cell used will be a cell in column H. I also know that the content of
that cell will be ==== (4 to 7 times =). Column H will contain text, blanks
(empty cells), numbers and other characters (like f.i. =). The number of
rows used will be at least 6 and could be as much as 200 or so (25 is
typical).

I need code to do the following.

I want to put al those files into one sheet of a new workbook (workbook name
XYZ, sheet name KLM). Therefore the files of the summary directory have to
be taken one after each other (I cannot call them by name because there is
no system in the way the number names follow each other, so it has to be
"first file", "next file" etc.) and have the content of their only sheet
copied (appended) to sheet KLM of workbook XYZ one after the other .

But first I want to put in cell H1 of each file of the summary directory the
entry "firstCNR" (without the ") followed by the number that is the name of
that file (so for instance firstCNR23 or firstCNR2045). After the last cell
in column H (which can only contain a number of = characters), so one cell
below the last cell used in column H, I want to put "lastCNR" (without the
") followed by the number that is name of that file.

The thus modified file has to be put back in the summary directory after it
is appended two rows below to what already consists on sheet KLM of the new
workbook XYZ.

If the operation is completed all "number files" are back in the "summary"
directory, but slightly modified with first CNR... and lastCNR.. In sheet
KLM of workbook XYZ colums A to H we have then the some 800 files (slightly
modified) of "summary" below one other with one empty row separating them.

Your help will be enormously appreciated.

Jack Sons
The Netherlands



 
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
csv files Jake Excel Discussion (Misc queries) 2 January 27th 05 06:07 PM
multiple text files URGENT tasha Excel Discussion (Misc queries) 1 December 19th 04 05:44 PM
importing multiple text files URGENT!!! HELP tasha Excel Worksheet Functions 0 December 19th 04 04:26 PM
importing multiple text files??? tashayu Excel Discussion (Misc queries) 0 December 19th 04 02:43 PM
Why does Excel saves all my files as temporary files? Arija Excel Discussion (Misc queries) 2 December 7th 04 11:38 PM


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