Search Folders for Partial Name

helpexcel

Well-known Member
Joined
Oct 21, 2009
Messages
656
Hi - Is there a way to search folders to open by matching just a partial folder name. For example: I want to use cell C1 as a reference for the folder name. So while C1 has the text "Peter Piper Picked", and the folder on the drive is titled Peter Piper Picked (12 Pickles), it would still open the folder. thanks!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
1. Workbooks are opened, folders are not
- What is the end goal ? (list of files in folder ??)

2. What happens when Peter picked both 13 AND 14 Pickles?
- ie 2 or more folders match search criteria

3. Is the first bit of folder path consistent
ie C:\Test\Folder1\SubFolderX\Peter Piper Picked etc

4. Is the partial folder name ALWAYS first few characters of the foilder name ?
- ie search for Peter OR Peter Piper OR Peter Piper Picked
- search for Piper would not be matched unless a folder beginning with Piper exists
 
Upvote 0
End Goal is a list of files in the folder.
Good question, There is a small chance of there being a 13 and 14. If it does happen, is there a wya to open the most recent folder or give the user the option?
The folder path will be "\\server\Folder1\SubFolderx"&Range("A2")
the partial folder name would always match Peter Piper Picked.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top