TEXTCENTER

centers text with padding to reach specified length · a deepcalc original · no excel equivalent · no sheets equivalent

signature

TEXTCENTER(text, length, [pad_char])

returns: text

argumentrequired
text required
length required
pad_char optional

examples

formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.

fx =TEXTCENTER("hello", 11, "-") ---hello---
A
1 10
fx =TEXTCENTER(A1, 20) 10

related

  • ASC converts full-width characters to half-width
  • BAHTTEXT spells a number as thai baht and satang
  • CHAR returns the character for a character-set code
  • CLEAN removes non-printable characters
  • CODE numeric code of the first character
  • CONCAT joins multiple text strings into one