Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have comma delimited values that look like :

17  ab  2880662,2880663
15  ab  2877244,2877247
21  ab  2874201
21  ab  2873876

When I copy this to Excel it should split the comma-delimited values into two cells, like this:

17  ab  2880662    2880663
15  ab  2877244    2877247
21  ab  2874201    (empty)
21  ab  2873876    (empty)

When I use copy as a text it doesn't work, so I need a genius idea please :)

share|improve this question

migrated from stackoverflow.com Apr 1 at 17:52

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 27 down vote accepted
  1. Paste the entire text into the first cell
  2. click on the icon that appears on the bottom of the paste and choose "use text import wizard"
  3. In step two of the wizard, choose both spaces and commas as delimiters

You should get exactly what you want. I tried this using your text and it worked. Not sure if Excel 2003 has this, but subsequent versions do.

share|improve this answer

You could first select a cell containing some text then choose:

Data > Text To Columns > Delimited > Next : Comma Check.

then just click Cancel to store these settings. If you copy and paste comma separated text from notepad now it should separate out into columns as required.

Note: with the default settings (Number format set to general) Excel tries to interpret some data values such as dates and numbers depending on your local settings. For example copying across "3/7" may be interpreted as an American or European date, or when copying numeric codes across leading zeros may be lost. To avoid any unwanted conversions, you can set the Number Format for the columns that data is going to be copied to as Text.

share|improve this answer

Save your data in a plain text editor like notpad as myfile.csv and open it with excel. There you can set the delimiter to comma.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.