# MID

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function returns the requested number of characters from a text string starting at the position you specify.

## Syntax

MID(*text*,*start\_num*,*num\_chars*)

## Arguments

This function has these arguments:

| **Argument** | **Description** |
| -------- | ----------- |
| *text* | Text string containing the characters you want to extract |
| *start\_num* | Number representing the first character you want to extract in text, with the first character in the text having a value of one (1); if not an integer, the number is truncated |
| *num\_chars* | Number of characters to return from text; if not an integer, the number is truncated |

The *text* argument can be a string, a formula that returns a string, or a reference to a cell containing a string.The *start\_num* argument has these rules

* If *start\_num* is greater than the length of *text*, this function returns "" (empty text).If *start\_num* is less than the length of *text*, but *start\_num* plus *num\_chars* exceeds the length of *text*, this function returns the characters up to the end of text.

## Data Types

Accepts string data for the text argument, numeric data for the *start\_num* argument, and numeric data for the *num\_chars* argument. Returns string data.

## Examples

`MID(B17,5,8)`
`MID("wind surfing", 6, 20)` gives the result surfing

## Version Available

This function is available in product version 1.0 or later.

## See Also

[LEFT](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/FunctionLEFT) \| [RIGHT](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsRtoS/FunctionRIGHT) \| [Text Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functstext)