PDA

View Full Version : Looping through cells and move sheets from file in folder.



sckumar
01-29-2010, 11:39 AM
Hi,

Could some one please help me on this:

Description:
This should be a one- or two-line description of the outcome after the code has been run.

There are file names vertically in worksheet(find attached sample) and I have files of these names in folder.
On file name in the cell and file name in the folder matches, the sheets in the file should move to the file.


Discussion:
Provide a real-life scenario in which this code can be used. You can use as much space as you like here. Be friendly if you can, remembering that we need to cater to people who do not understand VBA.

There will be many sample files which consist of file name’s vertically in one folder (find sample attached) and there are files in the another folder with these names consists of details in many sheets.

So I want to have a macro where, it should ask for path twice one for opening of sample files in the folder and another path for source folder which has file details.

Criteria : if the file name in the sample file and file name in folder matches(first 40 characters) the sheets in the file should move or copy to the sample file.

Code:

I have codes for opening sample files and I need your support for looping through the cells and on blank cell in sample file while looping it should close the file.

Please find codes in the sample file attached.

Thanks in advace.

CK-,

pvanrooijen
02-03-2010, 01:52 PM
Suggestion:
Why don't you place 'reports done' and 'reports pending' in two different folders with that name and browse the folder you want.
You can make a routine to combine all the files in that specific folder and make an index as first sheet.
See the KB for combine files from folder and loop through files.

Just an idea to start with.

Interested to know why you wrote 'Be friendly if you can, remembering that we need to cater to people who do not understand VBA' is part of your post?

sckumar
02-07-2010, 11:26 AM
I can place both files done and pending in one folder,but i'm not getting the loop with checks for creteria and moves/copy the sheets to sample file.

could you please help me on this.

sckumar
02-14-2010, 12:26 PM
Can you please help me on this ASAP.

Bob Phillips
02-14-2010, 12:32 PM
Interested to know why you wrote 'Be friendly if you can, remembering that we need to cater to people who do not understand VBA' is part of your post?

Because it's homework? That's how I read it.

sckumar
02-15-2010, 12:56 PM
Hello Xld,

Are you working with my requirement,could u please help me ASAP.

Wellthe reason i wrote "Be friendly... because i got the format initially to submit for the help as with bolded headings as below and there by to expalin..

sckumar
03-01-2010, 11:32 AM
Can some one help on this.