View Single Post
 
Old 02-20-2023, 06:54 AM
kilroyscarnival kilroyscarnival is offline Windows 10 Office 2021
Expert
 
Join Date: May 2019
Posts: 358
kilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nice
Default

Ah, OK, I didn't realize that if it would work in Power BI it would also work in Excel.

I did open your workbook and change the directory. It does give me a nifty listing of just the main project folders on the drive. My wrinkle is that I actually need the subfolders for invoices in each of the project folders. I am able to do that in Power Query, except for the few Invoices files that don't yet have invoices in them. I'm also able to add a column that trims the long folder just down to the project number, which gives me exactly what I need except for those few empty ones. I have tinkered around with the setup you shared, and I can only get it to list the main folders on the drive.

What I do to get the subfolders is get a list of everything, then filter for where the folder path ends in "Invoices", then filter to uniques. Then I duplicate the folder path column and trim to just the project number, giving me the XLOOKUP info that I need to do the "auto-filing" VBA that Paul helped me figure out here (https://www.msofficeforums.com/excel...using-vba.html)

If I'm missing something and there's a way to get into subfolders, I'll keep trying.

Thanks!

Ann
Reply With Quote