Text to Column in cell with mixed cases

mitsoulas13

New Member
Joined
May 26, 2016
Messages
2
Hi guys,

I have a column filled with cells as the example below:

COMPANY NAME (in Upper case,not fixed number of words) Category Name (in proper case, not fixed number of words)

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 401"]
<tbody>[TR]
[TD="width: 401, align: left"]BRAVO AQUA PARK Playgrounds

[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BRAVO TRAVEL Travel Agencies - Ticket Agencies [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ECONOMIC GROWTH AE Business Consultant

[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 401"]
<tbody>[TR]
[TD="width: 401, align: left"][/TD]
[/TR]
</tbody>[/TABLE]
and so one (total number of cells 476K). The only way to distinguish[FONT=arial, sans-serif] the company name and the category name is that the company name is always in upper case and the category name starts in proper case)
[/FONT]
I want to text to column those cell, splitting them by the case, meaning:
[TABLE="width: 500"]
<tbody>[TR]
[TD]BRAVO AQUA PARK[/TD]
[TD]Playgrounds [/TD]
[/TR]
[TR]
[TD]BRAVO TRAVEL[/TD]
[TD]Travel Agencies - Ticket Agencies [/TD]
[/TR]
[TR]
[TD]ECONOMIC GROWTH AE[/TD]
[TD]Business Consultant[/TD]
[/TR]
</tbody>[/TABLE]

Does anyone have any clue how I'm supposed to do that (if that's possible)? Thanks in advance
 
Maybe this
Enter array formula in B1 and copy down

=LEFT(A1,MIN(IFERROR(FIND(CHAR(ROW(INDIRECT("97:122"))),A1),""))-3)
***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

then in C1 and copy down

=TRIM(SUBSTITUTE(A1,B1,""))


Book1
ABC
1BRAVO AQUA PARK PlaygroundsBRAVO AQUA PARKPlaygrounds
2BRAVO TRAVEL Travel Agencies - Ticket AgenciesBRAVO TRAVELTravel Agencies - Ticket Agencies
3ECONOMIC GROWTH AE Business ConsultantECONOMIC GROWTH AEBusiness Consultant
Sheet2
 
Upvote 0
Try this

=REPLACE(A1,MIN(FIND(CHAR(ROW(INDIRECT("97:122"))),A1&"abcdefghijklmnopqrstuvwxyz"))-2,1,"@")
Array formula, use Ctrl-Shift-Enter.

This finds the first lowercase letter in the string, goes two positions back (should be a space) and changes it to an 'at' sign.
Then use Text To Columns with a delimiter of @ to separate the com[pany name from the description.

Source based on this: How to find position of capital letter in a text string?
Post #7
 
Upvote 0
Thank you both for your replies.

Both solutions work like a charm but I'm having another problem now. See, some of those cells (I didn't included any of these at the example) have Greek letters. Meaning the "97:122" Ascii codes don't work at those cells.

Any idea how to work this out?

Again, many thanks for your replies!

Example Table:

[TABLE="width: 274"]
<tbody>[TR]
[TD="width: 274"]TALLY WEIJL - ΘΗΡΑ Μπουτίκ
[TABLE="width: 274"]
<tbody>[TR]
[TD="width: 274"]ΑΛΕΞΙΟΥ Α ΕΠΕ Φυτώριο
[TABLE="width: 274"]
<tbody>[TR]
[TD="width: 274"]ΔΗΜΟΣ ΓΕΩΡΓΙΟΣ Υδραυλικά είδη [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

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