Home > OS > Want to make Spanish and Chinese vocabulary, how the Spanish and Chinese will be automatically divid
Want to make Spanish and Chinese vocabulary, how the Spanish and Chinese will be automatically divid
Time:09-19
Want to make Spanish and Chinese words and phrases, how the Spanish and Chinese will be automatically divided into two columns, with regular or Excel how to solve? For example the format below:
Inobservancia to comply with the Interrogatorio questioning Irretroactividad not back before sex Defend alegacion Alta traicion treason Alteracion del orden disturbing the peace Anteproyecto bill Anulacion abolished Apelar appeal Recurrir appeal Aplicacion DE la ley, law enforcement Audiencia publica trial Audiencia trial
CodePudding user response:
Suppose you a row in cell A1, suggest to try with the following formula,
LEFT (A1, LENB (A1) - LEN (A1)) RIGHT (A1, LEN (A1) * 2 - LENB (A1))
Practical principles is that LENB returns number of bytes, LEN returns the number of characters, their difference is the length of the string in Chinese, through the left or right separation, If the formula is invalid, and you excel to set the default language,
CodePudding user response:
Under the excel version, Left shows is empty, Right to show Chinese and Spanish, under the excel the spanish-language version, Left and Right are unable to identify, display a question mark,
CodePudding user response:
There are people to save post??
CodePudding user response:
Can only write the custom formula, and find out the location of the first Chinese characters, shard, because some Spanish characters also fell on the characters of western language character, also subdivided, Or may be considered in UEdit32 spin-off, but watch just now, as if also is not reliable,
CodePudding user response:
The original poster is in reply to me? Reply post after the proposal point of reference, so others can get message, I didn't pass, is to look at the post just came in to see, otherwise I still don't know you this is invalid! If not, you should use VBA, night back to your code,
CodePudding user response:
1. Open the excel, at the same time, press the Alt + F11, pop-up window is the VBA environment, 2. On the left side of the partial insertion module interface,
3. Double-click to open the module, attention must be open module, paste the code below: 4. Back to excel spreadsheet interface, in the target cell, input=CN (A1), after return will extract Chinese characters,
Function CN (CH As String) As String Dim Chinese As Object The Set Chinese=CreateObject (" VBSCRIPT. REGEXP ") Chinese. The Pattern="[^ \ u4e00 - \ u9fa5]" Chinese. The IgnoreCase=True Chinese. Global=True CN=Chinese. Replace (CH, "") The Set of Chinese=Nothing End the Function
Extraction function is realized in "^ \ u4e00 - \ u9fa5", actually on behalf of the Chinese characters of regular expression, such as extraction of Spanish, please find the relevant regular,