How to use the Excel LEFTB function

LEFTB functions are TEXT functions in Microsoft Excel. LEFT returns the first character or characters in a text string, based on the number of characters you specify. While, LEFTB returns the first character or characters in a text string, based on the number of bytes you specify.

Syntax: =LEFTB(text, [num_bytes])

The LEFTB function syntax has the following arguments:

  • Text (required): refers to the entry that contains the desired data. This argument is either a cell reference to the location of the data in the worksheet or the actual text enclosed in quotation marks.
  • Num_bytes (optional): specifies the number of characters on the left of the string argument to be retained in bytes. All other characters are removed.

Note:

  • These functions may not be available in all languages.
  • LEFTB counts 2 bytes per character only when a DBCS language is set as the default language. Otherwise LEFTB behaves the same as LEFT, counting 1 byte per character.

Add a Comment

Your email address will not be published. Required fields are marked *