## How to use the MID function

*Article updated on April 19, 2018*

The MID function returns a substring from a string based on the starting position and the number of characters you want to extract.

### Excel Function Syntax

MID(*text*, *start_num*, *num_chars*)

### Arguments

text |
Text string or a cell reference to a text string. |

start_num |
The starting point. |

num_chars |
The number of characters you want to extract. |

### Example

The first argument is the text string, the second argument is the start position. In this case character number 3, note spaces are counted.

The third argument is how many characters you want to extract counted from the start position.

### Articles with the 'MID' Function

The following 13 articles have formulas that contain the MID function.

I read an interesting blog post Is A Particular Word Contained In A Text String? on Spreadsheetpage. That inspired me […]

This formula returns multiple values even if they are arranged differently or have minor misspellings compared to the lookup value.

Table of contents Initials from first and last names Initials from first, middle and last names Create middle name initials […]

Chirag asks: I want to separate numbers from following text: Abc123bx45 as a result 123 and 45 should be in […]

The DATEVALUE function returns an Excel date value (serial number) based on a date stored as text. However, it must […]

Remove duplicate text strings based on the 4 last characters

Sean asks: The good thing about this formula is that it is short and easy to remember. The main drawback […]Match a range value containing both text and numerical characters

Formula in cell C11: =LOOKUP(MID(C10, 4, 999)*1, MID(B3:B8, 4, 999)*1, D3:D8) This formula is an array formula. To enter an array […]
The array formula in cell C3:C7 extracts everything except numbers from cell B3. The following formula contains the TEXTJOIN function […]

The formula displayed above in cell range D3:D9 extracts a word based its position in a cell value. For example, […]

### Functions in 'Text'

The MID function function is one of many functions in the 'Text' category.

The ASC function converts full-width (double-byte) characters to half-width (single-byte) characters. This function is for double-byte character set (DBCS) languages. […]

Use CHAR function to convert a number to the corresponding character. This is determined by your computers character set. Windows ANSI […]

The CLEAN function deletes nonprintable characters in a value, more specifically, it is designed to delete the first 32 nonprinting […]

The CODE function returns a specific number for the first character of the text argument, determined by your computers character set. […]

The CONCAT function concatenates values from multiple cells. There is, however, no delimiting character or a way to ignore empty […]

The EXACT function allows you to check if two values are precisely the same, it returns TRUE or FALSE. The […]

The FIND function returns the position of a specific string in another string, reading left to right. Note, the FIND function […]

The FIXED function rounds a number to the specified number of decimals, formats the number in decimal format using a […]

The LEFT function extracts a specific number of characters always starting from the left. Excel Function Syntax LEFT(text, [num_chars]) Arguments […]

The LEN function returns the number of characters in a cell value. Formula in cell D3: =LEN(B3) Cell B7 contains […]

The LOWER function converts a value to lower case letters. Formula in cell C3: =LOWER(B3) Excel Function Syntax LOWER(text) Arguments […]

The MID function returns a substring from a string based on the starting position and the number of characters you want […]

The RAND function calculates a random real number greater than or equal to 0 and less than 1. The function […]

The REPT function repeats a specific text a chosen number of times. Formula in cell D3: =REPT(B3,C3) Excel Function Syntax […]

The RIGHT function extracts a specific number of characters always starting from the right. Excel Function Syntax RIGHT(text,[num_chars]) Arguments text […]

Returns a number representing the position a substring is, if found in a textstring. FIND is case sensitive and SEARCH is not.

The SUBSTITUTE function replaces a specific text string in a value. Case sensitive. Formula in cell E3: =SUBSTITUTE(B3,C3,D3) Excel Function […]

The T function returns a text value if the argument is a text value. Formula in cell C3: =T(B3) The […]

Excel function syntax TEXT(value, format_text) Converts a value to text in a specific number format. Arguments value - The string […]

The TEXTJOIN function is a new function for office 365 subscribers, it is like the CONCATENATE function on steroids or what the CONCATENATE function […]

The picture above shows you values that have multiple leading and trailing blanks, sometimes also between words. The TRIM function […]

Converts a value to upper case letters. Formula in cell C3: =UPPER(B3) Excel Function Syntax UPPER(text) Arguments text Value to convert. Required. Share […]

Converts a text string that represents a number to a number. This function is included for compatibility with other software. […]