Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Append worksheet to another inside a directory

I'm not sure if my first post got in so I'm reposting this, just in case.

I have hundreds of Time Series Excel files inside a file folder. They all
have the same headers, number of columns, and same data types (but different
number of rows).

The files are categorized by their filenames. Example, 0101010A.xlsx is for
one time period and 0101010B is for another time period. There are only two
categories (A and B) in the entire folder.

I need a code that:
(1) reads and compares the first 8 characters of the filenames in the
directory.

If they are the SAME:
A) Appends contents of file *B to file *A after the last row of file
*A. (Do not append the header from file *B).

Thanks for any advice/help.

Marilyn

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Append worksheet to another inside a directory

You could probably use some of this to get you there.

http://www.rondebruin.nl/copy2.htm

HTH,
Barb Reinhardt

"Marilyn" wrote:

I'm not sure if my first post got in so I'm reposting this, just in case.

I have hundreds of Time Series Excel files inside a file folder. They all
have the same headers, number of columns, and same data types (but different
number of rows).

The files are categorized by their filenames. Example, 0101010A.xlsx is for
one time period and 0101010B is for another time period. There are only two
categories (A and B) in the entire folder.

I need a code that:
(1) reads and compares the first 8 characters of the filenames in the
directory.

If they are the SAME:
A) Appends contents of file *B to file *A after the last row of file
*A. (Do not append the header from file *B).

Thanks for any advice/help.

Marilyn

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Append worksheet to another inside a directory

Marilyn
Your example file names have only 7 characters before the "A" and "B".
Is this just a typo or did I miss something? Read what Barb gave you and if
you need more, post back and I'll work up something for you. HTH Otto
"Marilyn" wrote in message
...
I'm not sure if my first post got in so I'm reposting this, just in case.

I have hundreds of Time Series Excel files inside a file folder. They all
have the same headers, number of columns, and same data types (but
different
number of rows).

The files are categorized by their filenames. Example, 0101010A.xlsx is
for
one time period and 0101010B is for another time period. There are only
two
categories (A and B) in the entire folder.

I need a code that:
(1) reads and compares the first 8 characters of the filenames in the
directory.

If they are the SAME:
A) Appends contents of file *B to file *A after the last row of file
*A. (Do not append the header from file *B).

Thanks for any advice/help.

Marilyn



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
search folder/directory for a phrase inside excel files pwrichcreek Excel Discussion (Misc queries) 5 August 11th 08 09:39 PM
append worksheet with data from another Mark B Excel Worksheet Functions 3 May 8th 08 06:19 PM
Place a variable inside a directory path Brad J.[_5_] Excel Programming 0 June 24th 06 04:38 PM
Append columns to existing worksheet? Chris Burnette Excel Programming 0 November 2nd 05 08:51 PM
use macro to append records to worksheet goingtospace Excel Programming 0 December 2nd 04 01:12 PM


All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"