Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I parse one column into different columns?

I've inherited a big spreadsheet with a column that is full of entries
like

"Symptom : PAIN Cause : INFECTION Rx : AMOXICILLIN Symptom :
SORENESS Cause : STRAIN Rx : TYLENOL"

Does anyone know of a good way to change this column into three
separate columns like

Symptom1 Cause1 Rx1 Symptom2 Cause2 Rx2
PAIN INFECTION AMOXICILLIN SORENESS STRAIN TYLENOL

Thanks for any suggestions. (I've looked at a few books and couldn't
find an example, and I thought somebody out there may have encountered
this problem...)

Kay

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default How do I parse one column into different columns?

\tools\data\text to columns, delimiting using : should do it

"Kay E" wrote in message
...
I've inherited a big spreadsheet with a column that is full of entries
like

"Symptom : PAIN Cause : INFECTION Rx : AMOXICILLIN Symptom :
SORENESS Cause : STRAIN Rx : TYLENOL"

Does anyone know of a good way to change this column into three
separate columns like

Symptom1 Cause1 Rx1 Symptom2 Cause2 Rx2
PAIN INFECTION AMOXICILLIN SORENESS STRAIN TYLENOL

Thanks for any suggestions. (I've looked at a few books and couldn't
find an example, and I thought somebody out there may have encountered
this problem...)

Kay



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 329
Default How do I parse one column into different columns?

Hi Kay,

If your data are actually structured like:
Symptom : PAIN Cause : INFECTION Rx : AMOXICILLIN
Symptom : SORENESS Cause : STRAIN Rx : TYLENOL
and not all on one line, like:
Symptom : PAIN Cause : INFECTION Rx : AMOXICILLIN Symptom : SORENESS Cause : STRAIN Rx : TYLENOL
then, provided each category consists of one word only, it's relatively easy.

With:
Symptom : PAIN Cause : INFECTION Rx : AMOXICILLIN
Symptom : SORENESS Cause : STRAIN Rx : TYLENOL
the first step would be to use Date|Text to Columns|Delimited check Space & Other. For other, insert a colon (:)
Click Finish.

This will give six columns
Symptom|PAIN|Cause|INFECTION|Rx|AMOXICILLIN
Symptom|SORENESS|Cause|STRAIN|Rx |TYLENOL
Now, insert a blank row and copy the new second row and paste it into the worksheet at B1
Finally, select columns A, C, E & G (eg select A then hold down the Ctrl key as you select C, E & G) then press delete.

Voila! Data in three columns with headers.

If your data structure isn't so simple, it'll take more work to parse

Cheers


--
macropod
[MVP - Microsoft Word]


"Kay E" wrote in message ...
| I've inherited a big spreadsheet with a column that is full of entries
| like
|
| "Symptom : PAIN Cause : INFECTION Rx : AMOXICILLIN Symptom :
| SORENESS Cause : STRAIN Rx : TYLENOL"
|
| Does anyone know of a good way to change this column into three
| separate columns like
|
| Symptom1 Cause1 Rx1 Symptom2 Cause2 Rx2
| PAIN INFECTION AMOXICILLIN SORENESS STRAIN TYLENOL
|
| Thanks for any suggestions. (I've looked at a few books and couldn't
| find an example, and I thought somebody out there may have encountered
| this problem...)
|
| Kay
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I combine spreadsheets and documents in one file? Trish Excel Discussion (Misc queries) 3 November 9th 06 09:17 PM
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Multiple columns of data into one long column beatrice25 Excel Discussion (Misc queries) 2 May 21st 06 01:18 AM
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"