TRIMRIGHT

You can use the TRIMRIGHT function to remove spaces or a text string at the end of text.

TRIMRIGHT removes trailing characters from a text item.

Syntax:
TRIMRIGHT ( single-text-expression [ , single-text-expression ] )
Meaning:
TRIMRIGHT ( item_to_trim [ , text_to_trim ] )
Returns:
A single text item

TRIMRIGHT removes trailing characters that match text_to_trim from item_to_trim and returns the result as a single text item. If text_to_trim is not specified, trailing spaces are removed from item_to_trim.

Example

  • TRIMRIGHT ( "abc " )

    Returns: abc

  • TRIMRIGHT ( "Cat in the Hat!?!?!?" , "!?" )

    Returns: Cat in the Hat

  • TRIMRIGHT ( LastName Column:Row )

    Returns the content of LastName Column after removing all trailing spaces.

Related functions

  • FILLLEFTP
  • LEAVEPRINT
  • FILLRIGHT
  • SQUEEZE
  • LEAVEALPHA
  • SUBSTITUTE
  • LEAVEALPHANUM
  • TRIMLEFT
  • LEAVENUM