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: 60
Default VBA to move WS from 1workbook to another based on critieria

I've created a series of workbooks by using a macro to filter out data
and export it to a workbook for two separate tasks. I now have 2
folders each with a series of workbooks (Folder 1 & Folder 2). Folder
1 is the non-salary budget file and Folder 2 is the salary budget
file.

The file names are in the format of 234-2340100-101-99999999.xls in
Folder 1 and in Folder 2 its 234-2340100-101-99999999 - salary.xls

What I'm hoping to do, primarily to save time, is to automate it
rather than doing it manually (52 workbooks). What I would like to do
is to run a macro that will

A) Look at a workbook in Folder 1, if its finds a match in Folder 2
(trim " - salary.xls") it will copy the worksheet from the workbook in
Folder 2 into the workbook in Folder, save the file in a new directory
(OUTPUT) and add the text " - done" to the file in Folder 2. (That way
I can identify if there is a file in Folder 2 which doesn't have a
corresponding file in Folder 1)
B) If there isn't a matching workbook in Folder 2, it will save the
workbook from Folder 1 into the output directory.
C) If there is a workbook in Folder 2 and there is no matching
workbook in Folder 1 then it would save the workbook in the Output
folder.

I believe this would be possible, but I'm not sure how to do it.
 
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
how to count entries in one column based on critieria in another c jw Excel Discussion (Misc queries) 2 May 27th 09 07:12 AM
SUMIF and list of possible critieria blswes Excel Worksheet Functions 2 October 7th 08 10:20 PM
Median return for multiple critieria Angela Excel Discussion (Misc queries) 5 June 18th 08 11:24 AM
Deleting Rows Based on Column Critieria blackmanofsteel40 Excel Programming 3 September 12th 07 05:43 PM
Deleting Rows based on Column Critieria blackmanofsteel40 Excel Discussion (Misc queries) 1 September 7th 07 09:05 PM


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