Text Functions
| Function | Purpose | Example |
|---|
LEFT(text,n) | First n chars | =LEFT("Mumbai",3) β Mum |
RIGHT(text,n) | Last n chars | =RIGHT("Mumbai",3) β bai |
MID(text,start,n) | n chars from position | =MID("Mumbai",2,3) β umb |
LEN(text) | Character count | =LEN("Mumbai") β 6 |
Finding Text
| Function | Case-sensitive | Wildcards |
|---|
FIND(find_text, within_text, [start]) | β
| β |
SEARCH(find_text, within_text, [start]) | β | β
(*, ?) |
Both return the position (integer), or #VALUE! if not found.
Combining Text
=CONCAT(A1,B1,C1) β simple join, no delimiter
=TEXTJOIN(", ", TRUE, A1:A10) β join with delimiter, ignore_empty
=A1&" "&B1 β classic ampersand method
Modifying Text
| Function | Purpose |
|---|
TRIM(text) | Removes extra spaces (keeps single spaces between words) |
CLEAN(text) | Removes non-printable characters |
UPPER(text) / LOWER(text) / PROPER(text) | Case conversion |
SUBSTITUTE(text,old,new,[instance]) | Replace by matching text |
REPLACE(text,start,n,new) | Replace by position |
REPT(text,n) | Repeat text n times |
Number β Text Conversion
=TEXT(1234.5,"#,##0.00") β "1,234.50"
=TEXT(TODAY(),"dd-mmm-yyyy") β "22-Jul-2026"
=VALUE("1234") β 1234 (text to number)
=NUMBERVALUE("1.234,50","," ,".") β locale-aware conversion
Common TEXT() Format Codes
| Code | Result |
|---|
0 | Digit, forces zero |
# | Digit, optional |
0.00 | 2 decimal places |
#,##0 | Thousands separator |
0% | Percentage |
dd/mm/yyyy | Date format |
hh:mm:ss | Time format |
βΉ#,##0.00 | Currency (INR) |
Splitting Text
- Text to Columns: Data ribbon β Text to Columns (delimiter or fixed width)
- Formula approach (365):
=TEXTSPLIT(text, col_delimiter, [row_delimiter])
- Get first/last word:
=LEFT(A1,FIND(" ",A1)-1) β first word
=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",100)),100)) β last word (classic trick)
See Also