SPLIT Function (LibreOffice Calc — Modern/Array-Compatible)
The SPLIT function returns an array of text segments split by a specified delimiter. It is a modern, dynamic-array text splitter ideal for parsing structured strings, CSV fragments, and multi-part identifiers.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✖ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✖ |
| Onlyoffice | ✔ |
| Openoffice | ✖ |
| Wps | ✔ |
| Zoho | ✔ |
What the SPLIT Function Does ▾
- Splits text into multiple parts based on a delimiter
- Returns a dynamic array (spills into adjacent cells)
- Supports multi-character delimiters
- Supports optional instance limits
- Works with text, numbers (converted to text), and formulas
It is designed to be clean, modern, and extremely powerful for structured parsing.
Syntax ▾
SPLIT(text; delimiter; [limit]; [match_mode])
Arguments
-
text:
The text to split. -
delimiter:
The text or pattern used to split. -
limit: (optional)
Maximum number of splits.- Omitted → split all occurrences
- 1 → return entire text as a single element
- 2 → split into two parts (first delimiter only)
-
match_mode: (optional)
- 0 → case-sensitive (default)
- 1 → case-insensitive
Basic Examples ▾
Split a hyphen-separated string
=SPLIT("A-B-C"; "-")
Returns array: {“A”; “B”; “C”}
Split a CSV fragment
=SPLIT("A,B,C"; ",")
Split only at the first delimiter
=SPLIT("A-B-C"; "-"; 2)
Returns {“A”; “B-C”}
Case-insensitive split
=SPLIT("A|b|C"; "B"; ; 1)
Returns {“A|”; “|C”}
Advanced Examples ▾
Split a file path into components
=SPLIT(A1; "/")
Split an email into username and domain
=SPLIT(A1; "@"; 2)
Split a product code
=SPLIT(A1; "-")
Split on multi-character delimiter
=SPLIT(A1; " - ")
Split a sentence into words
=SPLIT(A1; " ")
Split with dynamic delimiter
=SPLIT(A1; B1)
Split only the first N parts
=SPLIT(A1; ","; 3)
Split and recombine with TEXTJOIN
=TEXTJOIN(" | "; TRUE; SPLIT(A1; ","))
Extract the last element using INDEX
=INDEX(SPLIT(A1; "-"); -1)
Extract the first element
=INDEX(SPLIT(A1; "-"); 1)
Split and clean each element
=TRIM(SPLIT(A1; ","))
Split and uppercase each element
=UPPER(SPLIT(A1; ","))
Edge Cases and Behavior Details ▾
delimiter not found → returns entire text as a single element
=SPLIT("ABC"; "-") → {"ABC"}
delimiter empty → Err:502
limit = 1 → returns entire text unchanged
limit > number of delimiters → remaining elements empty
match_mode controls case sensitivity
text is a number → converted to text
=SPLIT(2024; "2") → {"", "0", "4"}
SPLIT of an error propagates the error
=SPLIT(#N/A; ",") → #N/A
Multi-character delimiters are treated literally
Dynamic array behavior
- Output spills into adjacent cells
- Overlapping content → #SPILL! (in engines that support it)
LibreOffice support
- SPLIT is part of the modern function roadmap
- Behavior may vary depending on version and dynamic array support
Common Errors and Fixes ▾
Err:502 — Invalid argument
Occurs when:
- delimiter is empty
- limit is non-numeric
- match_mode invalid
Unexpected number of elements
Cause:
- limit applied
- delimiter appears fewer times than expected
Case sensitivity mismatch
Fix:
Use match_mode = 1.
Hidden characters break splitting
Fix:
Use CLEAN or SUBSTITUTE to normalize text.
Best Practices ▾
- Use SPLIT for clean, readable parsing instead of FIND/MID chains
- Use INDEX to extract specific elements
- Use TEXTJOIN to recombine elements
- Use TRIM and CLEAN to normalize split output
- Use multi-character delimiters for structured text
- Use limit to control output size
Related Patterns and Alternatives ▾
- Use TEXTBEFORE and TEXTAFTER for targeted extraction
- Use SEARCH or FIND for positional parsing
- Use LEFT, RIGHT, MID for manual extraction
- Use SUBSTITUTE for delimiter normalization
- Use TEXTJOIN for recombining split elements
By mastering SPLIT and its companion functions, you can build powerful, modern, and highly readable text‑processing workflows in LibreOffice Calc.