Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Subfolders to a set level

Status
Not open for further replies.

Birling

Technical User
Sep 19, 2010
1
GB
I want to be able to get a list of folders/subfolders into excel but only to list the path to a set level ie just to SubA and SubB of each House folder. eg: C:\TEST\House1\SubA\sub2\sub3... C:\TEST\House1\SubB\sub2\sub3.... C:\TEST\House2\SubA\sub2\sub3\sub4....and so on.
Each House will always have SubA and only sometimes subB. all the other subs1,2,3 etc are always named the same.
I have tried to use various code from here but being am getting more *%$££%6-up!

I have used code from and tried to adapt looking at but without success. I could list all the folders using the first code and then sort colsC on spreadsheet, deleting those not required but that seems messy, must be a way to vba right? Thanks in advance, Birling spreadsheet at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top