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

Automating data import from multiple files

I have a program (third party, I can't change) that produces 35 different csv files. The naming convention for these files is BASE_VAR.csv where BASE is the same for all the files and VAR is different for each file. I'll end up doing this 100 times, with different BASE so I want to automate it.

Each csv file has 2 columns, the first column is a list of dates that is the same for each file and the second column is the variable name specified by VAR.

The goal is to import all of these into an Excel file where sheet name is BASE and then the first column is dates (shared by all files) and then columns B-? correspond to the 35 different VARs. There would be 100 sheets, each named for the value in BASE.

So, in my mind, the workflow would be:

For a given BASE (so 35 csv files),

  1. create new sheet. name it base

  2. import both columns from the first csv file so now we have dates and VAR1

  3. import the next 34 file but only the second column of each one (the csv files have a column listing for each different VAR so importing the second column will already have identifying info).

Then repeat for the other 99 BASE values.

Anyone have ideas on how to automate this?

Thanks for any help!

submitted by /u/yevquest
[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
#natural language processing for spreadsheets
#Excel compatibility
#Excel alternatives
#rows.com
#google sheets
#financial modeling with spreadsheets
#workflow automation
#big data management in spreadsheets
#conversational data analysis
#real-time data collaboration
#intelligent data visualization
#data visualization tools
#enterprise data management
#big data performance
#data analysis tools
#data cleaning solutions
Automating data import from multiple files