• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Removing the ' * ' symbol from strings in bulk.

Hi


I've a list of country names with * at the end of some them. This list is generated each year, and some country's lose the * depending on the year.


I'm going to extract data from each year using INDEX/MATCH so I need to remove the *
at the end of each country.


I've found and tried this:
Code:
=IF(RIGHT(L13,)="*",LEFT(L13,LEN(L13)-1),L13)
But it's not worked.


The *
seems to be the problem. Any ideas?
 
Hi,


Yes, just to explain why....


The syntax of the RIGHT() worksheet function is:

RIGHT(text,num_chars)


RIGHT(L13,) is the equivalent of RIGHT(L13,0) which isn't what you want.

RIGHT(L13) is the equivalent of RIGHT(L13,1) because if num_chars is omitted then the default value is 1.
 
You can also do "FIND AND REPLACE" on the original column

1. Select the column.

2. Invoke FIND and REPLACE dialog [CTRL+H]

3. FIND: ~*

4. REPLACE: Keep Blank

and the replace all.
 
Back
Top