Removing special characters
Hello!
I am importing from excel and ending up with extra characters in the cell. For example, instead of the cell displaying:
Spanish, Portugues
I am instead seeing:
["Spanish","Portugues"]
Is there a formula that would remove the [ ] " from the cell?
Thank you!
Best Answer
-
This should do the trick:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE([YOUR COLUMN]@row, ",\"", ", "), "\"", ""), "[", ""), "]", "")
Answers
-
=SUBSTITUTE(SUBSTITUTE([YOUR COLUMN]@row, "[", ""), "]", "")
Replace the column name as needed. This assumes that all entries are in the same column.
-
@Carson Penticuff Your formula removed the [ ] and resulted in:
"Spanish","Portuguese"
Is it possible to remove all of the " " to result in:
Spanish, Portuguese
-
This should do the trick:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE([YOUR COLUMN]@row, ",\"", ", "), "\"", ""), "[", ""), "]", "")
-
@Carson Penticuff This should do the trick:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE([YOUR COLUMN]@row, ",\"", ", "), "\"", ""), "[", ""), "]", "")
____________________
This is perfect, Thank you!!!!
-
@Carson Penticuff I believe you can use CHAR(34) in place of quotes instead of the backslash. Gets rid of one of the SUBSTITUTE functions (and can be used to insert quotes in a text string output as well). Might be helpful in the future.
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE([YOUR COLUMN]@row, "[", ""), "]", ""), CHAR(34), "")
-
@Paul Newcome Thanks, Paul. I didn't think about using CHAR() to avoid having to escape the quotes. I added the extra SUBSTITUTE() to preserve the space after the comma as in Jennifer's example. Learning something new every day!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!