Fortune Telling Collection - Comprehensive fortune-telling - How does excel extract text and numbers from cells respectively?

How does excel extract text and numbers from cells respectively?

As shown in the figure:

Formula in cell B2: =LEFT(A2, LENB(A2)-LEN(A2))

Formula in C2 cell: = right (A2,2 * LEN (A2)-LENB (A2))

Formula in cell E2: =LEN(A2)

Formula in F2 cell: =LENB(A2)

Take the characters of the text left and right, and explain them left and right:

LEFT (string, n): string cell, where n means to fetch several characters, and left means to fetch characters from the left.

Right is the same.

LEN is a measure of the number of characters in a cell, regardless of Chinese characters and numbers, each one counts as a character.

LENB is a measure of how many bytes a cell has. A Chinese character is 2 bytes, and English and numbers are 1 byte.

There is a logic to understand here. When using LENB, we take "Wang Zhongwang V 28669" as the name.

Wang Zhongwang V: Four words, and LENB will calculate that it is eight bytes.

28669: 5 characters, which is 5 bytes calculated by LENB.

So this paragraph is 13, LEN only counts characters, 4+5 = 9, and 13-9 is redundant. If you don't look at the extra, you can see that the number of Chinese characters has doubled, then this extra is the number of Chinese characters. It's so logical, if you think about it carefully, you will understand the idea of this formula.