1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

I want to use Power Query to import data received from a client, where the file name changes each month. What's the easiest way to automate this?

I used to use VBA for this, but that's a lot more roundabout, and I have a lot less control over the transformation.

I have no issues with transforming the actual data itself. My issue lies in the fact that it's a different file each month. Using wildcard formatting, *filehere*.xls* would always pull the correct file. This file is also stored in the same place relative to my spreadsheet each time, but the location of the spreadsheet and folders itself changes each month.

In VBA, I could find the relative position quite easily via ThisWorkbook.Path & "\Data\"

However, I don't know how to use PQ to import automatically like this, so that I'd always import the correct data simply by refreshing links. I think I've seen people set up a somewhat hacky way, where PQ first reads a table in the workbook to retrieve values, and then uses those to find the file to query. Is that the only way?

submitted by /u/space_reserved
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#generative AI for data analysis
#real-time data collaboration
#big data management in spreadsheets
#conversational data analysis
#intelligent data visualization
#digital transformation in spreadsheet software
#no-code spreadsheet solutions
#modern spreadsheet innovations
#machine learning in spreadsheet applications
#enterprise-level spreadsheet solutions
#collaborative spreadsheet tools
#AI-driven spreadsheet solutions
#cloud-based spreadsheet applications
#automation in spreadsheet workflows
#rows.com
#natural language processing for spreadsheets
#Excel compatibility
#financial modeling with spreadsheets
#Power Query