How do I separate a comma-separated list into two columns in Excel?
I have a long, comma-separated list which looks like this in Excel:
401.50,0.027
402.00,0.028
402.50,0.029
403.00,0.031
403.50,0.032
404.00,0.034
404.50,0.037
Is there a simple way to convert this into two separate columns? There are over 800 values, and I am really not looking forward to separating them all individually.
Have you tried using Text to Columns?
- Highlight the column that contains your list.
- Go to Data > Text to Columns.
- Choose Delimited. Click Next.
- Choose Comma. Click Next.
- Choose General or Text, whichever you prefer.
- Leave Destination as is, or choose another column. Click Finish.
You could also use two formulas in two separate columns.
To get the values to the left of the comma:
=0+LEFT(K1,FIND(",",K1)-1)
To get the values to the right of the comma:
=0+RIGHT(K1,LEN(K1)-FIND(",",K1))
where K1
contains the initial string, such as 401.50,0.027
** 0+
before the formulas converts the extracted substrings to numerical data.
Copy/Paste the text into a text editor Replace all space characters with carriagereturn/linefeeds Save as a TXT file. Open the file in Excel.