How to return partical text?

yichuansancun

Board Regular
Joined
Feb 7, 2011
Messages
123
Hello -

I have the following:
<table style="width: 172px; height: 18px;" border="0" cellpadding="0" cellspacing="0"><col width="172"><tr height="17"> <td class="xl68" style="height: 12.75pt; width: 129pt;" height="17" width="172"> <table style="width: 455px; height: 180px;" border="0" cellpadding="0" cellspacing="0"><col style="width: 129pt;" width="172"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; width: 129pt;" height="17" width="172">Santiago, Chile</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">San Jose, Costa Rica</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">Mexico City, Mexico</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">Bentonville AR, U.S.A.</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">Miami FL, U.S.A.</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">Sao Paulo, Brazil</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">Dhaka, Bangladesh</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">Mexico City, Mexico</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl69" style="height: 12.75pt; border-top: medium none;" height="17">Sao Paulo, Brazil</td> </tr> </tbody></table></td> </tr></table>
How can I ask Excel to turn the anything that is after ", "?

For example for Santiago, Chile, Excel should return "Chile".

Please note that there is a space after the ",".

Thanks :stickouttounge:

Perri
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Give this formula a try...

=TRIM(RIGHT(SUBSTITUTE(A1,",",REPT(" ",99)),99))

This formula assume that none of your text is longer than 99 characters. If it could be, then change the two 99s to any number larger than the largest number of characters you could possibly have in any one piece of text.
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

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