Separating multiple columns with comma separated values at once in Excel

956 Views Asked by At

I have an excel sheet with comma-separated values in 35 consecutive columns. I want to separate the comma-separated values into columns for all 35 columns at once. Is there any code or shortcut to that?

At present, I first enter a new column next to every column with comma-separated values and then select each column, and then I use text-to-columns from the Data tab to manually do it for all 35 columns.

If somebody could help me with that, it would be great. Thank you.

The first picture shows the data I have and the second picture shows what I want to have at the end. enter image description here

enter image description here

1

There are 1 best solutions below

0
On

That is an easy job for Power Query, or Get & Transform on the Excel Data ribbon.

Don't open the CSV file in Excel. Use the ribbon command to load the CSV file with Power Query, split each column, save the query.

enter image description here

When you get the next batch of data, just point to the new CSV file in the query and refresh the query.

No writing code, just clicking ribbon commands.