Text functions
Function | Description | Examples |
|---|---|---|
CHAR(number) | CHAR converts a number to a character using the current code table. The number argument is a two-digit or three-digit integer between 1 and 255 that represents the character's code value. | |
CODE(text) | CODE returns the numeric code for the first character in a text string. The text argument is the string you want to check. | |
CONCATENATE(text1, text2, ...textN) | CONCATENATE combines several text strings into one string. The text1, text2, ...textN arguments are the strings you want to combine. | |
DOLLAR(value, decimals) | DOLLAR converts a number to currency format and rounds it to the specified decimal places. The value argument can be a number, a reference to a cell containing a number, or a formula that returns a number. The optional decimals argument sets the number of decimal places. If you leave it out, currency values display with two decimal places. Your system settings determine the currency format. | |
EXACT(text1, text2) | EXACT compares two text strings and returns TRUE if they are identical. The comparison is case-sensitive. The text 1 and text 2 arguments are the strings you want to compare. | |
FIND(findText, text, position) | FIND searches for text within another string. The findText argument is the text to find and can be a number or any string of characters. The text argument is the string to search. The optional position argument sets where the search starts within text. The search is case-sensitive. | |
LEFT(text, number) | LEFT returns characters from the start of a text string. The text argument is the string to use. The optional number argument sets how many characters to return. If you leave it out, LEFT returns one character. | -- |
LEN(text) | LEN returns the length of a text string, including spaces. The text argument is the string to measure. | -- |
LOWER(text) | LOWER converts all uppercase letters in a text string to lowercase. The text argument is the string to convert. | |
MID(text, start, number) | MID returns a segment of a text string. The text argument is the string to use. The start argument sets the position of the first character to extract. The number argument sets how many characters to return. | |
PROPER(text) | PROPER capitalises the first letter of every word in the text string you provide. | |
REPLACE(text, position, length, new) | REPLACE replaces part of a text string with different text. The text argument is the original string. The position argument sets where the replacement starts. The length argument sets how many characters to replace. The new argument is the replacement text. | |
REPT(text, number) | REPT repeats a text string. The text argument is the string to repeat. The number argument sets how many times to repeat it. The result can contain a maximum of 255 characters. | |
RIGHT(text, number) | RIGHT returns characters from the end of a text string. The text argument is the string to use. The optional number argument sets how many characters to return. | |
SUBSTITUTE(text, searchText, newText, occurrence) | SUBSTITUTE replaces old text with new text in a string. The text argument is the original string. The searchText argument is the segment to replace. The newText argument is the replacement text. The optional occurrence argument sets the number of occurrences of searchText to replace. If you leave it out, SUBSTITUTE replaces searchText throughout the string. | |
TRIM(text) | TRIM removes spaces from the start of a text string or aligns cell contents to the left. The text argument is the string or cell whose contents you want to align to the left. | |
UPPER(text) | UPPER converts a text string to uppercase. The text argument contains the lowercase letters you want to convert. | |
VALUE(text) | VALUE converts a text string to a number. The text argument is the string to convert. |