BAHTTEXT Function (LibreOffice Calc)
The BAHTTEXT function converts a number into Thai text representing the amount in Thai Baht. It is used for financial documents, invoices, and official Thai-language forms.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✖ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✖ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the BAHTTEXT Function Does ▾
- Converts numbers → Thai words
- Appends the Thai currency unit (บาท / สตางค์)
- Handles integers and decimals
- Automatically formats currency wording according to Thai linguistic rules
- Useful for accounting, invoicing, and legal documents
Syntax ▾
BAHTTEXT(number)
Arguments
- number:
A numeric value to convert into Thai Baht text.
Basic Examples ▾
Convert a simple number
=BAHTTEXT(1250)
→ "หนึ่งพันสองร้อยห้าสิบบาทถ้วน"
Convert with satang (decimal)
=BAHTTEXT(1250.75)
→ "หนึ่งพันสองร้อยห้าสิบบาทเจ็ดสิบห้าสตางค์"
Using a cell reference
=BAHTTEXT(A1)
Convert a negative number
=BAHTTEXT(-500)
→ "ลบห้าร้อยบาทถ้วน"
Advanced Examples ▾
Combine with TEXT for formatted output
="ยอดรวม: " & BAHTTEXT(A1)
Use with ROUND to control satang precision
=BAHTTEXT(ROUND(A1; 2))
Convert imported text numbers
=BAHTTEXT(VALUE(A1))
Use in invoice templates
=BAHTTEXT(SUM(C2:C20))
Wrap in IF for zero‑value handling
=IF(A1=0; "ศูนย์บาทถ้วน"; BAHTTEXT(A1))
Edge Cases and Behavior Details ▾
BAHTTEXT returns a Thai text string
Accepts:
- Integers
- Decimals
- Negative numbers
- Numeric expressions
Behavior details
- Automatically appends บาท and สตางค์
- Uses Thai linguistic rules for number formation
- If decimal part = 0 → adds ถ้วน
- If number = 0 → returns “ศูนย์บาทถ้วน”
- Negative numbers are prefixed with ลบ
Invalid input → Err:502 (non-numeric)
BAHTTEXT of an error → error propagates
Common Errors and Fixes ▾
Err:502 — Invalid argument
Cause:
- Text that cannot be converted to a number
- Blank cells
Fix:
- Wrap with VALUE
- Validate numeric input
Unexpected Thai wording
Cause:
- Thai number rules differ from English
- Decimal precision not controlled
Fix:
- Use ROUND for consistent satang
- Verify Thai linguistic conventions
Best Practices ▾
- Use BAHTTEXT for Thai‑language invoices and receipts
- Normalize imported numbers with VALUE
- Use ROUND to avoid floating‑point satang issues
- Combine with CONCATENATE or & for formatted financial statements
- Validate negative values for proper prefixing
BAHTTEXT is essential for Thai‑language financial documents — producing legally acceptable currency wording automatically and accurately.
Related Patterns and Alternatives ▾
- Use TEXT for numeric formatting
- Use FIXED for currency‑style numbers
- Use DOLLAR for Western currency formatting
- Use ROMAN for numeral conversion
- Use VALUE to sanitize imported numeric text
By mastering BAHTTEXT, you can generate professional, compliant Thai‑language financial documents directly within LibreOffice Calc.