# LEFT

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 specified leftmost characters from a text value.

## Syntax

LEFT(*mytext*,*num\_chars*)

## Arguments

This function has these arguments:

| **Argument** | **Description** |
| -------- | ----------- |
| *mytext* | Text string that contains the characters you want to extract. |
| *num\_chars* | [Optional] Number of characters to extract; if omitted, uses one; if not an integer, the number is truncated |

The *mytext* argument can be a string, a formula that returns a string, or a reference to a cell containing a string.
The *num\_chars* argument has these rules:

* It must be greater than or equal to zero.
* If it is greater than the length of text, this function returns all the text.

## Data Types

Accepts string data for the first argument and numeric data the second argument. Returns string data.

## Examples

`LEFT(A2,LEN(A2)–1)`
`LEFT(R2C1,LEN(R2C1)–1)`
`LEFT("TotalPrice")` gives the result T
`LEFT("Total Price", 5)` gives the result Total

## Version Available

This function is available in product version 1.0 or later.

## See Also

[MID](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsMtoQ/FunctionMID) \| [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)