Removing Chinese characters from cells

theMaj

New Member
Joined
Jul 6, 2006
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I have a worksheet with more than 1,000 rows of Inventory Items and in each cell there is a mix of English characters and Chinese as in:
"< Macallen Highland Malt 12 Yr 麦卡伦蓝钻12年单一麦芽苏格兰威士 >
There is no consistency of EN - CN or CN- EN and it leaves me with large column widths, not to mention that many of the translations are sloppy and incorrect. My Pivot Tables look even worse as you may imagine. I was wondering whether there is some Excel function or a simple VBA that could some how filter out the CN in an adjacent column. I'm using latest subscription Office 365
 

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.
You could try a formula like this in an adjacent column...
Excel Formula:
=TEXTJOIN("",TRUE,IF(CODE(MID(A1,SEQUENCE(LEN(A1)),1))<>63,MID(A1,SEQUENCE(LEN(A1)),1),""))
Hope that helps,

Doug
 
Upvote 0
Solution
Doug, that is ingenious....worked like a charm. Only remaining issue is 'how the hell does this work, so short & simple but I have no idea what it's doing...'? Other than some magical thing about the '>63'.
I've seen a multitude of solutions requiring the use of multiple columns (added, then hidden), and others using VBA which I really didn't want to deal with but this did exactly what I needed.
Thank you very much, made my day....
 
Upvote 0
so short & simple
Instead of using TEXTJOIN with "" as the delimiter, even shorter to use CONCAT.
Try this as well.
Excel Formula:
=LET(c,MID(A1,SEQUENCE(LEN(A1)),1),CONCAT(IF(CODE(c)=63,"",c)))
 
Upvote 0
Glad we could help. The formula checks each character in the string to see if it's character code is equal to 63 and keeps only those not equal to 63.

Doug
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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