TEXTCOMPARE

compares two texts and returns -1, 0, or 1 · a deepcalc original · no excel equivalent · no sheets equivalent

signature

TEXTCOMPARE(text1, text2, [case_sensitive])

returns: text

argumentrequired
text1 required
text2 required
case_sensitive 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 =TEXTCOMPARE("apple", "banana") -1
AB
1 102
fx =TEXTCOMPARE(A1, B1, FALSE) -1

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