↑ Return to Text functions

LEFT – RIGHT – MID

 

Text functions are convenient to extract a part of a cell. In the following example, we’ll extract different part of the phone number.

LEFT function

We want to extract the dialing code of cells. The dialing code is the first 3 digits of the phone number. To extract these figures, we will use the function LEFT.

This function is very simple to use because you only need 2 informations: your initial text (generally the reference of a cell) and the number of digit you want to extract (3 in this case).

Function has the following writing:

 

=LEFT(B2,3)

 

RIGHT function

In the same way, if you want to extract the last 4 digits of the phone number, you use this time the function RIGHTas follow:

 

=RIGHT(B2,3)

 

MID function

It is also possible to extract a part of a string inside it. To do that, you will use MID function.

In parameters of this function, you must

  • in first, put the reference of your cell
  • on the second, indicate the position where you want to start your extraction
  • on third, precise number of characters you want to extract


So, if you want to extract the mobile phone number of the cell B8 in the cell C8, you will write following formula:

 

=MID(B8,20,8)

In this example, figure 20 represents number of characters between the first character of the cell and the beginning of the mobile phone number. And 8 represents the 7 figure + the dash.



1 comment

  1. Ken

    This is great, but can I combine left and right in one cell? For example, I want the 3 left characters a space and then the 4 right characters from one cell into another cell.

Leave a Reply

%d bloggers like this: