ASC Function (LibreOffice Calc)
The ASC function converts full-width (double-byte) characters to half-width (single-byte) characters. It is primarily used for Japanese and East Asian text normalization.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✖ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the ASC Function Does ▾
- Converts full-width characters → half-width
- Normalizes Japanese and East Asian text
- Useful for data cleaning, imports, and text comparison
- Complements the JIS function (half-width → full-width)
Syntax ▾
ASC(text)
Arguments
- text:
A string containing characters to convert.
Basic Examples ▾
Convert full-width English letters
=ASC("ABC")
→ "ABC"
Convert full-width numbers
=ASC("1234")
→ "1234"
Convert full-width punctuation
=ASC("!@#")
→ "!@#"
Using a cell reference
=ASC(A1)
Advanced Examples ▾
Normalize imported Japanese text
=ASC(A1)
Combine with JIS for round-trip conversion
=JIS(ASC(A1))
Normalize before comparison
=ASC(A1)=ASC(B1)
Clean mixed-width product codes
=ASC(SUBSTITUTE(A1; "-"; "-"))
Normalize before VLOOKUP
=VLOOKUP(ASC(A1); ASC(Table); 2; 0)
Convert only part of a string
=LEFT(ASC(A1); 5)
Edge Cases and Behavior Details ▾
ASC returns a text string
Accepts:
- Any text
- Mixed-width strings
- Unicode characters
Behavior details
- Only characters with full-width equivalents are converted
- Non-convertible characters remain unchanged
- Works with Japanese kana, ASCII, numbers, and punctuation
- Does not convert kanji (漢字) — they are already full-width
- Useful for DBCS (double-byte character set) environments
Invalid input → Err:502 (rare)
ASC of an error → error propagates
Common Errors and Fixes ▾
Unexpected characters remain unchanged
Cause:
- Character has no half-width equivalent
- Kanji or symbols that do not map to ASCII
Fix:
- Use SUBSTITUTE for custom mappings
- Use UNICODE/UNICHAR for manual conversions
VLOOKUP mismatch
Cause:
- One value is full-width, the other half-width
Fix:
- Normalize both sides with ASC
Best Practices ▾
- Always normalize imported Japanese/East Asian text
- Use ASC before comparisons, lookups, and joins
- Combine with JIS for full-width ↔ half-width workflows
- Use LENB, LEFTB, MIDB, RIGHTB for byte-aware operations
- Use CLEAN to remove control characters after conversion
ASC is your full‑width → half‑width normalization engine — essential for Japanese text cleaning, imports, and reliable comparisons.
Related Patterns and Alternatives ▾
- Use JIS to convert half-width → full-width
- Use UNICODE and UNICHAR for precise character control
- Use LENB, LEFTB, MIDB, RIGHTB for byte-level operations
- Use CLEAN and TRIM for text sanitization
By mastering ASC and its companion functions, you can build robust, reliable, and fully normalized text-processing workflows in LibreOffice Calc.