Ways to separate names and phone numbers using Excel functions

Source: Internet
Author: User

ways to separate names and phone numbers using Excel functions

Example: As shown in the following illustration, the contents of column A are required to be split into columns B and C.

Analysis: Chinese characters are double-byte, while letters and numbers are single-byte. In Excel functions, a class of functions with B, such as the LEFTB,RIGHTB,MIDB,SEARCHB function, can differentiate between single and double bytes, so we can use a function with B to solve this problem.

B2 formula:

=LEFTB (A2,searchb ("?", A2)-1)

C2 formula

=MIDB (A2,searchb ("?", A2), 11)

Formula Description: SEARCHB is a function to find a particular character position in a string, and it can distinguish between single and double bytes, and it is possible to use wildcard characters for finding and distinguishing. In a formula is a character that represents any single byte, and is a wildcard. Not really looking for a question mark.

The MidB is loaded by byte number. A Chinese character is counted as two bytes, and letters and numbers are counted separately.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.