laitimes

How Excel extracts the numbers on the left side of the text

As below screenshot shown, the left side of column B cells is irregular numbers, and now we want to extract these numbers.

How Excel extracts the numbers on the left side of the text

In cell C2, enter the formula =LEFT(B2,2*LEN(B2)-LENB(B2)) and press Enter.

How Excel extracts the numbers on the left side of the text

Fill the C2 cell formula drop-down to the end to complete the extraction of all values.

How Excel extracts the numbers on the left side of the text

Let's introduce the len function and the lenb function, LEN returns the number of characters in the text string,

THE LEMB, on the other hand, returns the number of bytes in the text string that are used to represent characters.

How Excel extracts the numbers on the left side of the text

In this article we calculate the number of numbers contained in each cell by using [2*LEN(B2)-LENB(B2)]. For your convenience, I enter the formula =2*LEN(B2)-LENB(B2) in cell D2 and pull down fill, the result is as below screenshot shown.

How Excel extracts the numbers on the left side of the text

Finally, there is the let function, which returns a specified number of characters starting with the first character of a text string. In this article we use the let function to extract the numbers in the text.

How Excel extracts the numbers on the left side of the text