Text Functions

The following section describes each availabe function for manipulting text strings, its associated syntax and examples of how to use each.


LEN

Returns you the length of a piece of text i.e. the number of characters. Note that spaces count.

SyntaxWhereResult
LEN(x)x is textA number

 

ExampleResult
=LEN("Mobile Forms")12

 


UPPER

Returns a string of text with all letters in upper-case.

SyntaxWhereResult
UPPER(x)x is textText

 

ExampleResult
=UPPER("Mobile Forms")"MOBILE FORMS"

 


LOWER

Returns a string of text with all letters in lower-case.

SyntaxWhereResult
LOWER(x)x is textText

 

ExampleResult
=LOWER("Mobile Forms")"mobile forms"

 


TRIM

Returns a string of text with all spaces at both the start and end of the text removed. Any spaces between words are preserved.

SyntaxWhereResult
TRIM(x)x is textText

 

ExampleResult
=TRIM("  Mobile Forms  ")"Mobile Forms"

 


REPT

Returns a text string composed of the characyed x repeated n times.

SyntaxWhereResult
REPT(x, n)is text
n is a number
Text

 

ExampleResult
=REPT("-", 4)"----"

 


SUBSTITUTE

Returns a string with all occurrences of y in x replaced with z.

SyntaxWhereResult
=SUBSTITUTE(x, y, z)x is text
y is text
z is text
Text

 

ExampleResult
=SUBSTITUTE("loonie toon", "oo", "u")"lunie tun"

 


FIND

Returns a result which is the location of the first occurance of x in y, after the nth character, or zero if x does not appear in y. n is treated as 1 if it is less than 1 (the first character). The result is always zero if n is greater than the length of y, since x will never apper after the end.

SyntaxWhereResult
FIND(x, y, n)x is text
y is text
n is a number
A number

 

ExampleResult
=FIND("oo", "loonie toon", 1)2
=FIND("oo", "loonie toon", 2)2
=FIND("oo", "loonie toon", 3)1
=FIND("oo", "loonie toon", 10)0
=FIND("u", "loonie toon", 1)0