# TEXTBEFORE

## Content

This function converts a text string that is a number to a numeric value.

## Syntax

`TEXTBEFORE(text,delimiter,[instance_num], [match_mode], [match_end], [if_not_found])`

## Arguments

This function has these arguments:

| Argument | Description |
| -------- | ----------- |
| *text* | [Required] The text you are searching within. Wildcard characters are not allowed. If text is an empty string, Excel returns empty text. |
| *delimiter* | [Required] The text that marks the point before which you want to extract. |
| *instance\_num* | [Optional] The instance of the delimiter after which you want to extract the text. By default, instance\_num = 1. A negative number starts searching text from the end.  |
| *match\_mode* | [Optional] Determines whether the text search is case-sensitive. The default is case-sensitive. Enter one of the following:<ul><li>**0**      Case sensitive.</li><li>**1**      Case insensitive.</li></ul> |
| *match\_end* | [Optional] Treats the end of text as a delimiter. By default, the text is an exact match. Enter the following:<ul><li>**0**      Don't match the delimiter against the end of the text.</li><li>**1**      Match the delimiter against the end of the text.</li></ul> |
| *if\_not\_found* | [Optional] Value returned if no match is found. By default, #N/A is returned. |

## Examples

`TEXTBEFORE(A2,"Red")`
`TEXTBEFORE(A3,"Red",,FALSE)`