简体   繁体   中英

Separating multiple columns with comma separated values at once in Excel

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. 在此处输入图像描述

在此处输入图像描述

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.

在此处输入图像描述

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM