Macro merger of filenames that start with a specific name

  • Hello,


    I have a macro that consolidates all filenames that start with "BDRIDGE" and have a "DATAx" sheet.name from all containing subfolders. The path of the subolders being added in the 1st sheet of the macro file.

    My problem is that the macro does not retrieve anything as it only runs and creates a blank new sheet without data.


    Any help please ? ( zip archive attached also)




    Testing.zipTesting.zip

  • You might try 2 simple things before debugging the code

    1. Use Option Explicit at the beginning of you code module to catch any misspelled variables

    2. Remove all the On Error Resume Next / On Error Goto 0 lines of code - they may be hiding a problem

    If I've been helpful, let me know. If I haven't, let me know that too.

  • Is this any better? I've changed what range is defined for copying


    What is Value referring to here. Is it a variable or do you mean Cell.Value?


    Code
    1. Value = Dir(cell.Value)
  • dangelor , tried but then it's erroring a lot (Rng, cell, chck etc.)

    royUK , sorry with the format. Tried your code but still not working.

    Technically that part refers to those folder paths inserted in the Range from Sheets "Library" and use them as variable.