Hi,
I have got a number of CSV files in a folder and want to open each csv, delete a number of columns, then save and close the csv.
Not sure where to start on this! Pretty new to VBA!
Any help is hugely appreciated!
Hi,
I have got a number of CSV files in a folder and want to open each csv, delete a number of columns, then save and close the csv.
Not sure where to start on this! Pretty new to VBA!
Any help is hugely appreciated!
Hi,
The simplest place to start is to record a macro, then edit it as necessary to remove a lot of superfluous stuff.
As far as I remember you can opt to choose to remove columns during the csv upload definition, but if you prefer you could just upload the whole file and then delete the columns afterwards. e.g. Range("B:B,E:E").Columns.Delete.
Then save the file as a .csv file, or perhaps you want to copy the data and paste into your destination workbook.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks