Thank you very much my friend.
Works to my requirement.
Your help will save me lot of time.
Regards
Nasir


On Wed, Jun 4, 2014 at 2:53 PM, Vaibhav Joshi <v...@vabs.in> wrote:

> PFA
>
> Cheers!!
>
>
> On Wed, Jun 4, 2014 at 1:51 AM, Nasir Khan <nasirkhan.du...@gmail.com>
> wrote:
>
>> Hello,
>> I am enclosing a sample of Excel sheet to what is required together with
>> explanation as a word file
>> Also I have made Source and Destination Folders to make it more clear for
>> testing the macro.
>> Hope it is Ok now.
>> Thanks
>> Nasir
>>
>>
>> On Mon, Jun 2, 2014 at 11:57 AM, Vaibhav Joshi <v...@vabs.in> wrote:
>>
>>> hi
>>>
>>> Can you share me whole excel sheet ..
>>>
>>> This will help..
>>>
>>> Cheers!!
>>>
>>>
>>> On Sun, Jun 1, 2014 at 12:59 AM, Nasir Khan <nasirkhan.du...@gmail.com>
>>> wrote:
>>>
>>>> Hello,
>>>> Please see the screenshot in yellow.
>>>> This is how my folders are set up.  The destination does not show the
>>>> files in the sub folder after Bkup\\
>>>>
>>>> Circled in Red shows the Sub Folder with their files.
>>>>
>>>> I have tested List files with both ways.
>>>>
>>>> Your formula in the Destination shows the correct file names within the
>>>> subfolders.
>>>> Its only when I click list files I get the #VALUE Error.
>>>>
>>>> I think it is the following part in Module1 which is generating the
>>>> error
>>>>
>>>> 'Fill formuaa form D1 to down
>>>>     'Actual formula is =$F$2&SUBSTITUTE(A2,$F$1,"")&"\"
>>>>     If Cells(Rows.Count, "B").End(3).row <> Cells(Rows.Count,
>>>> "D").End(3).row Then
>>>>     Range("D" & Cells(Rows.Count, "D").End(3).row, _
>>>>     "D" & Cells(Rows.Count, "B").End(3).row).Select
>>>>     Selection.FillDown
>>>>     End If
>>>>
>>>> I am not an VBA Expert maybe you can find the problem.
>>>> Thanks and best regards
>>>> Nasir
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, May 31, 2014 at 9:47 AM, Vaibhav Joshi <v...@vabs.in> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> You will get value for files stored in main folder. e.g.
>>>>> here C:\Test\Macro\.
>>>>>
>>>>> Since we intended to transfer only files from sub folders.
>>>>>
>>>>> HTH
>>>>>
>>>>>
>>>>> On Fri, May 30, 2014 at 8:29 PM, Nasir Khan <nasirkhan.du...@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> Hello,
>>>>>> I am getting a #VALUE error in the Destination when I click the List
>>>>>> Files button
>>>>>>
>>>>>> I have taken screenshot of Evaluate Formula screen for Pre and Post
>>>>>> Error.
>>>>>> Pre screenshot shows the Evaluate Formula just before the #Value
>>>>>> error pops up which is shown in the Post Screenshot
>>>>>> See attached please
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> On Wednesday, May 28, 2014 5:15:22 PM UTC+4, Vabz wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Check this ..
>>>>>>>
>>>>>>> Cheers!!
>>>>>>>
>>>>>>>
>>>>>>> On Wed, May 28, 2014 at 12:47 AM, Nasir Khan <nasirkh...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> Thanks for your reply but it is not getting the desired result.
>>>>>>>> Pl see attached files.
>>>>>>>> Folder List is what is source structure of the Folder
>>>>>>>> File list is a sample of file in the source folder
>>>>>>>> Destination Folder shows the Folder which does not have A E etc
>>>>>>>> Your code requires A, E etc to be in the destination then it copies
>>>>>>>> the files from source to Destination.
>>>>>>>>
>>>>>>>> As you can see files from the Source should directly go into the
>>>>>>>> respective folders in the destination.
>>>>>>>> Hope it is clear now.
>>>>>>>> Regards.
>>>>>>>> Nasir
>>>>>>>>
>>>>>>>>
>>>>>>>> On Monday, May 26, 2014 10:21:55 AM UTC+4, Nasir Khan wrote:
>>>>>>>>>
>>>>>>>>> Hello All,
>>>>>>>>>
>>>>>>>>> I have lots of folder in the path C:\Libraries\Documents\
>>>>>>>>>
>>>>>>>>> Viz: Folder A,  E, H, L, P etc
>>>>>>>>>
>>>>>>>>> Each folder has many workbooks where the workbook names has the
>>>>>>>>> folder Prefix
>>>>>>>>>
>>>>>>>>> Eg. Folder A will have many workbooks with name xxx-xxx-*A####*-xx
>>>>>>>>>      xxx-xxx-*A????-*xx and so on
>>>>>>>>>
>>>>>>>>>       Folder E will have workbooks with the name xxx-xxx-*Exxxx*-xx
>>>>>>>>>         xxx-xxx-*E????-*xx and so on
>>>>>>>>>
>>>>>>>>>       Folder H will have workbooks with the name xxx-xxx-*Hxxxx*-xx
>>>>>>>>>          xxx-xxx-*H????-*xx and so on
>>>>>>>>>
>>>>>>>>> There are many folders like this.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> In a separate Path viz C:\Myfolders\  I have all the folders eg
>>>>>>>>> *Axxxx*, *A????,* *Exxxx*, *E????,* *Hxxxx, H????* etc which are
>>>>>>>>> currently empty.
>>>>>>>>>
>>>>>>>>> I need a macro to run through the Path C:\Libraries\Documents\
>>>>>>>>>
>>>>>>>>> and copy the workbooks accordingly to the folder name found in the
>>>>>>>>> workbook name
>>>>>>>>>
>>>>>>>>> Eg: xxx-xxx-*Axxxx*-xx will be copied to Folder *Axxxx* and
>>>>>>>>> xxx-xxx-*A????*-xx to be copied to Folder *A????*
>>>>>>>>>
>>>>>>>>>      xxx-xxx-*Exxxx*-xx will be copied to Folder *Exxxx* and
>>>>>>>>> xxx-xxx-*E????*-xx to be copied to Folder *E????*
>>>>>>>>>
>>>>>>>>> and so on.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Any help would be greatly appreciated as I do this manually now.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> TIA
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Nasir
>>>>>>>>>
>>>>>>>>  --
>>>>>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna
>>>>>>>> be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this 
>>>>>>>> forum @
>>>>>>>> https://www.facebook.com/discussexcel
>>>>>>>>
>>>>>>>> FORUM RULES
>>>>>>>>
>>>>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like
>>>>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need
>>>>>>>> Advice will not get quick attention or may not be answered.
>>>>>>>> 2) Don't post a question in the thread of another member.
>>>>>>>> 3) Don't post questions regarding breaking or bypassing any
>>>>>>>> security measure.
>>>>>>>> 4) Acknowledge the responses you receive, good or bad.
>>>>>>>> 5) Jobs posting is not allowed.
>>>>>>>> 6) Sharing copyrighted material and their links is not allowed.
>>>>>>>>
>>>>>>>> NOTE : Don't ever post confidential data in a workbook. Forum
>>>>>>>> owners and members are not responsible for any loss.
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "MS EXCEL AND VBA MACROS" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to excel-macros...@googlegroups.com.
>>>>>>>> To post to this group, send email to excel-...@googlegroups.com.
>>>>>>>>
>>>>>>>> Visit this group at http://groups.google.com/group/excel-macros.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
>>>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>>>>>> https://www.facebook.com/discussexcel
>>>>>>
>>>>>> FORUM RULES
>>>>>>
>>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like
>>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need
>>>>>> Advice will not get quick attention or may not be answered.
>>>>>> 2) Don't post a question in the thread of another member.
>>>>>> 3) Don't post questions regarding breaking or bypassing any security
>>>>>> measure.
>>>>>> 4) Acknowledge the responses you receive, good or bad.
>>>>>> 5) Jobs posting is not allowed.
>>>>>> 6) Sharing copyrighted material and their links is not allowed.
>>>>>>
>>>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners
>>>>>> and members are not responsible for any loss.
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "MS EXCEL AND VBA MACROS" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to excel-macros+unsubscr...@googlegroups.com.
>>>>>>
>>>>>> To post to this group, send email to excel-macros@googlegroups.com.
>>>>>> Visit this group at http://groups.google.com/group/excel-macros.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>  --
>>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
>>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>>>>> https://www.facebook.com/discussexcel
>>>>>
>>>>> FORUM RULES
>>>>>
>>>>> 1) Use concise, accurate thread titles. Poor thread titles, like
>>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need
>>>>> Advice will not get quick attention or may not be answered.
>>>>> 2) Don't post a question in the thread of another member.
>>>>> 3) Don't post questions regarding breaking or bypassing any security
>>>>> measure.
>>>>> 4) Acknowledge the responses you receive, good or bad.
>>>>> 5) Jobs posting is not allowed.
>>>>> 6) Sharing copyrighted material and their links is not allowed.
>>>>>
>>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners
>>>>> and members are not responsible for any loss.
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "MS EXCEL AND VBA MACROS" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/excel-macros/LYqnw0wRjHo/unsubscribe
>>>>> .
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> excel-macros+unsubscr...@googlegroups.com.
>>>>>
>>>>> To post to this group, send email to excel-macros@googlegroups.com.
>>>>> Visit this group at http://groups.google.com/group/excel-macros.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  --
>>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
>>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>>>> https://www.facebook.com/discussexcel
>>>>
>>>> FORUM RULES
>>>>
>>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>>>> will not get quick attention or may not be answered.
>>>> 2) Don't post a question in the thread of another member.
>>>> 3) Don't post questions regarding breaking or bypassing any security
>>>> measure.
>>>> 4) Acknowledge the responses you receive, good or bad.
>>>> 5) Jobs posting is not allowed.
>>>> 6) Sharing copyrighted material and their links is not allowed.
>>>>
>>>> NOTE : Don't ever post confidential data in a workbook. Forum owners
>>>> and members are not responsible for any loss.
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "MS EXCEL AND VBA MACROS" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to excel-macros+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to excel-macros@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/excel-macros.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
>>> It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>>> https://www.facebook.com/discussexcel
>>>
>>> FORUM RULES
>>>
>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>>> will not get quick attention or may not be answered.
>>> 2) Don't post a question in the thread of another member.
>>> 3) Don't post questions regarding breaking or bypassing any security
>>> measure.
>>> 4) Acknowledge the responses you receive, good or bad.
>>> 5) Jobs posting is not allowed.
>>> 6) Sharing copyrighted material and their links is not allowed.
>>>
>>> NOTE : Don't ever post confidential data in a workbook. Forum owners and
>>> members are not responsible for any loss.
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "MS EXCEL AND VBA MACROS" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/excel-macros/LYqnw0wRjHo/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> excel-macros+unsubscr...@googlegroups.com.
>>> To post to this group, send email to excel-macros@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/excel-macros.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
>> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES
>>
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>> will not get quick attention or may not be answered.
>> 2) Don't post a question in the thread of another member.
>> 3) Don't post questions regarding breaking or bypassing any security
>> measure.
>> 4) Acknowledge the responses you receive, good or bad.
>> 5) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>
>> NOTE : Don't ever post confidential data in a workbook. Forum owners and
>> members are not responsible for any loss.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "MS EXCEL AND VBA MACROS" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to excel-macros+unsubscr...@googlegroups.com.
>> To post to this group, send email to excel-macros@googlegroups.com.
>> Visit this group at http://groups.google.com/group/excel-macros.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/excel-macros/LYqnw0wRjHo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to