Append worksheet to another inside a directory

M

Marilyn

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
 
O

Otto Moehrbach

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top