• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Open Workbook based on cell value from a folder / subfolder

Nalin

New Member
I have many excel files in a folder (divided into Sub folders). Based on a cell value (Ex sheet 1 "B2") if my value is A0100 I need to open that file. If there are many files with the same code need to open all files.
 
Attached sample file , which will be saved in a directory/folder/sub folder.
There are several worksheets in the workbook. The code i am looking is always in either mySheet1 or mySheet2 in Cell B2.

For me to find the correct file, I need to open each file and find the file with the code that I need.

I need a VBA code, when I input the code, it will search all folders/sub folders workbooks for mySheet1 and mySheet2 Cell B2, for the code that I input, either open the file or give me the path to the file.
There could be more than one file with the code.
 

Attachments

  • FindFile.xlsx
    9.7 KB · Views: 8
Back
Top