Excel Trim Function

Excel Trim function is very useful function that removes extra spaces from data. This formula removes all spaces from data except for single space between words. While validating data on the basis of, the trim function can give you valid length by removing spaces from beginning, spaces from end and extra spaces between words.

This can be useful for refining raw data received from any external application with irregular spacing.

The Microsoft Excel TRIM function returns a text value with the leading and trailing spaces removed. You can also use the TRIM function to remove unnecessary spaces between words in a string. The TRIM function is a built-in function in Excel that is categorized as a String/Text Function.


Syntax

  • Getting length of characters within a cell with cell reference:
  • =LEN(Cell Reference)
  • Getting length of a long string:
  • =LEN(“string”) (value needs to be kept within quotes)
  • Example

    Let's look at some Excel TRIM function examples and explore how to use the TRIM function as a worksheet function in Microsoft Excel:



advance excel & mis training institute in gurgaon

advanced excel institute in gurgaon

advanced excel institute in gurgaon sec-14

advanced excel training institute in gurgaon

best excel training institute in gurgaon

vba macro classes in gurgaon

f