Separating text in one cell into unique columns

sanjhackett

New Member
Joined
Jun 20, 2009
Messages
3
Hi,

I am trying to seperate a large amount of data into unique columns. How can i create a column with just health resort and yoga classes etc. An example of my data is:

Any assistance would be greatly appreciated.

<table x:str="" style="border-collapse: collapse; width: 96pt;" border="0" cellpadding="0" cellspacing="0" width="128"><col style="width: 48pt;" span="2" width="64"> <tbody><tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt; width: 96pt;" width="128" height="17">yoga_classes^,^yoga_intensive_courses^,^meditation_intensive_courses^,^seminars^,^teacher_training^,^india_tour^,^massage_intensive_courses</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">health_resort</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">health_resort^,^yoga_classes^,^meditation_classes^,^yoga_intensive_courses^,^seminars^,^teacher_training^,^yoga_classes^,^massage_intensive_courses</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">health_resort</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">health_resort^,^health_resort</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">health_resort^,^health_resort^,^yoga_classes^,^yoga_intensive_courses^,^meditation_intensive_courses^,^seminars^,^teacher_training^,^india_tour^,^massage_intensive_courses</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">health_resort</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td colspan="2" style="height: 12.75pt;" height="17">
</td> </tr><tr><td style="vertical-align: top;">
</td><td style="vertical-align: top;">
</td></tr> </tbody></table>
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Highlight the data to split.
Click on Data > Text to Columns > Delimited > Next
Make sure [x] Comma and [x] Other ^ are filled in
Click on [x] Treat consecutive delimiters as one
Finish.
 
Upvote 0
Thanks for your reply!

This seperates them but it doesn't keep all the same ones together. I need for example all the "Health resort" in one column and alll the ""yoga classes in another column etc

At the moment it looks like this:

<table style="padding-right: 2pt; padding-left: 2pt; font-size: 10pt; font-family: Arial,Arial; background-color: rgb(255, 255, 255);" border="1" cellpadding="0" cellspacing="0"> <colgroup> <col style="font-weight: bold; width: 30px;"> <col style="width: 805px;"></colgroup> <tbody> <tr style="font-weight: bold; font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;"> <td>
</td> <td>AN</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30634</td> <td>health_resort^,^yoga_classes^,^meditation_classes</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30635</td> <td>health_resort^,^health_resort^,^yoga_classes^,^meditation_classes</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30636</td> <td>meditation_classes^,^yoga_intensive_courses^,^massage_intensive_courses</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30637</td> <td>yoga_classes^,^meditation_classes^,^yoga_intensive_courses^,^massage_intensive_courses</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30638</td> <td>health_resort^,^yoga_classes^,^yoga_intensive_courses^,^massage_intensive_courses</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30639</td> <td>health_resort^,^health_resort^,^yoga_classes^,^meditation_classes^,^yoga_intensive_courses^,^massage_intensive_courses</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30640</td> <td>health_resort^,^health_resort^,^yoga_classes^,^meditation_classes^,^yoga_intensive_courses^,^massage_intensive_courses</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30641</td> <td>yoga_classes^,^meditation_classes^,^yoga_intensive_courses^,^massage_intensive_courses</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30642</td> <td>yoga_classes^,^meditation_classes^,^yoga_intensive_courses^,^massage_intensive_courses</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30643</td> <td>meditation_classes</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30644</td> <td>health_resort^,^health_resort</td></tr></tbody></table>

I would like it to look like this:

<table style="padding-right: 2pt; padding-left: 2pt; font-size: 10pt; font-family: Arial,Arial; background-color: rgb(255, 255, 255);" border="1" cellpadding="0" cellspacing="0"> <colgroup> <col style="font-weight: bold; width: 30px;"> <col style="width: 85px;"> <col style="width: 88px;"> <col style="width: 119px;"> <col style="width: 92px;"> <col style="width: 115px;"> <col style="width: 118px;"></colgroup> <tbody> <tr style="font-weight: bold; font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;"> <td>
</td> <td>AX</td> <td>AY</td> <td>AZ</td> <td>BA</td> <td>BB</td> <td>BC</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30634</td> <td>Health retreat</td> <td>Yoga Classes</td> <td>Meditation Classes</td> <td>
</td> <td>
</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30635</td> <td>Health retreat</td> <td>Yoga Classes</td> <td>Meditation Classes</td> <td>
</td> <td>
</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30636</td> <td>
</td> <td>
</td> <td>Meditation Classes</td> <td>Yoga Intensive</td> <td>Massage Intensive</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30637</td> <td>
</td> <td>Yoga Classes</td> <td>Meditation Classes</td> <td>Yoga Intensive</td> <td>Massage Intensive</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30638</td> <td>Health retreat</td> <td>Yoga Classes</td> <td>
</td> <td>Yoga Intensive</td> <td>Massage Intensive</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30639</td> <td>Health retreat</td> <td>Yoga Classes</td> <td>
</td> <td>Yoga Intensive</td> <td>Massage Intensive</td> <td>Mediation Intensive</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30640</td> <td>Health retreat</td> <td>Yoga Classes</td> <td>Meditation Classes</td> <td>Yoga Intensive</td> <td>Massage Intensive</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30641</td> <td>
</td> <td>Yoga Classes</td> <td>Meditation Classes</td> <td>Yoga Intensive</td> <td>Massage Intensive</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30642</td> <td>
</td> <td>Yoga Classes</td> <td>Meditation Classes</td> <td>Yoga Intensive</td> <td>Massage Intensive</td> <td>
</td></tr> <tr style="height: 17px;"> <td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">30643</td> <td>
</td> <td>
</td> <td>Meditation Classes</td> <td>
</td> <td>
</td> <td>
</td></tr></tbody></table>
Is it a matter of writing some sort of formula for each?
'Thanks again for your help too!



Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
OK, no macro needed, just construct some search formulas, one for each column and drag down. It allows you to customize the search string and the results that appear when true.

Excel Workbook
ANAXAY
30639health_resort^,^health_resort^,^yoga_classes^,^meditation_classes^,^yoga_intensive_courses^,^massage_intensive_coursesHealth ResortYoga Classes
Sheet4
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,051
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top