Tag Archives: Mid

Excel – Data Manipulation (part 1)

Particularly useful, these following examples can be applied to a cell to extract all kinds of data, and when used together can be particularly powerful when combined with the FIND command, though a little more on that in another post 🙂

 

How do I select a certain number of characters in a cell from the left in Excel?

=LEFT(text,[# of Chars])

Takes the characters from Left side of specified cell.

Example:

LEFT

A2 contains the example formula; it references A1 as its source, and take the first 3 characters from the left.

 

How do I select a certain number of characters in a cell from the right in Excel?

=RIGHT(text,[# of Chars])

Takes the characters from Right side of specified cell.

Example:

Right

A2 contains the example formula; it references A1 as its source, and take the first 3 characters from the left.

 

 How do I select text from the middle of a cell in Excel?

=MID(text,start #,[# of Chars])

Takes characters from anywhere in a cell, starting at the specified start point).

Example:

mid

A2 contains the example formula; it references A1 as its source. The start # is taken as the P in ‘Pies’ which is 25 characters from the beginning of the cell. The number of characters extracted is 4, giving the output from the sentence as ‘Pies’.

 

 How can I return the length of text in a cell in Excel?

=LEN(text)

Returns the length of data contained within a cell.

Example:

Len

A2 contains the example formula; it references A1 as its source. It returns the length of the string in A1, in this case 4.

Share This: