litLIB Help
Product pages :
litLIB
Quick links:
help index
forums

String - SplitText

Syntax:
=SplitText(Text [, Delimiter][, Limit][, Compare])

Array function.
To use this array function, select a range of cells (e.g. an area of 3 by 5 cells) and type the formula in the formula bar. Then press Ctrl+Shift+Enter.

Description:
Splits the text into separate fields which are shown in individual cells. By default SplitText will split the text at spaces. You can give another delimiting charater in the Delimiter parameter. By default SplitText will output all fields that it could split but you can limit the number of fields with the Limit parameter. By default SplitText will do a text comparison but you can set it to binary compare (0) using the Compare option

Text : String to split
Delimiter : Optional. String that delimits the fields (defaults to a space)
Limit: Optional. Sets a maximum to the number of fields to output
Compare: Optional. Sets the compare mode to binary (0) or text (1)

Example:
Select cells A1:E1
Type the following formula and press Ctrl+Shift+Enter

=SplitText("This is a great function")
Result:

          A     B     C      D        E
1      this   is    a       great    function


Other examples:
=SplitText("A|B|C|D|E|F|G" , "|")
=SplitText(A1),"<li>")