Danton1970
New Member
- Joined
- Jun 15, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
I have a dump of a large database in CSV format. One of the fields in the source has a comment section where the user can enter freeform text including commas which corrupts the CSV.
Looking to remove extra commas is a CSV file where there are extra
commas in the file. I think a macro along the lines of the following would fix the CSV,
Data Source
in a "good" row there will be 15 commas.
any extra commas will always by after the 10th comma
for each row count the number of commas as "x".
If the number of commas is greater than 15, let "y" be the number of extra commas ie let y= x-15"
If y>0 remove y commas after the 10th comma.
Looking to remove extra commas is a CSV file where there are extra
commas in the file. I think a macro along the lines of the following would fix the CSV,
Data Source
in a "good" row there will be 15 commas.
any extra commas will always by after the 10th comma
for each row count the number of commas as "x".
If the number of commas is greater than 15, let "y" be the number of extra commas ie let y= x-15"
If y>0 remove y commas after the 10th comma.