LEN () and LENB () functions in Excel
When you need to determine the length of a string while processing data in Excel, you cannot count each character individually because it will take a lot of time if the text string is long. The LEN () and LENB () functions will help you count the number of characters in a string.
If you do not know how to use the LEN () and LENB () functions, you follow the article below.
The article describes the syntax and usage of the LEN () and LENB () functions in Excel.
Description
The LEN () function returns the number of characters in the input text string.
The LENB () function returns the number of bytes used to represent characters in the input text string. The LENB function only comes to 2 bytes per character when the default language is one of the languages that supports DBCS.
Syntax
= LEN (text)
= LENB (text)
Where: text is the input text string that you want to find its length, counting both spaces and required parameters.
For example
LEN ()
Count the number of characters of the string TipsMake.vn
= LEN ("TipsMake.vn")
You can also refer to the text with a data box containing text for example: = LEN (B6)
The LENB () function you use is similar to the LEN () function, but when using the LENB function, the default language of your computer and Office must be set as one of the languages that support DBCS. Otherwise LENB () will return the same result as LEN ().
Above is how to use the LEN () and LENB () functions to get better results, you can combine these two functions with some functions in Excel. Good luck!
You should read it
- Complete financial functions in Excel you should know
- MS Excel - Lesson 5: Excel formulas and functions
- Summary of information functions in Excel
- Comparison functions in Excel - How to use comparison functions and examples using comparison functions
- Date time functions in Excel
- 10 EXCEL functions that ACCOUNTERS often use
- The 10 most useful but often forgotten functions in excel
- Logical functions (logical) in Excel
May be interested
- RIGHT () and RIGHTB () functions in Excelthe right () function returns the result as one or more final characters in a text string based on the number of characters you give. the right () function always comes with every 1 character whether it is single byte or double byte or whatever the default language is.
- SEARCH () and SEARCHB () functions in Excelthe search () function and the searchb () function are two functions that help you process strings in excel. when you need to find the starting position of a substring in a text string without case or case, you use the search () or searchb () function.
- DATEDIF () function (calculate the total number of years, total months or total days from two given periods) in Excelthe datedif () function helps you calculate the total number of years, the total number of months, or the total number of days from two given periods.
- DMAX () function (returns conditional maximum value) in Exceldmax () is the function that returns the maximum value in a column in a list or database that satisfies the condition that you give.
- DMIN () function (returns the minimum value by condition) in Exceldmin () function helps you find and return the smallest value in a column in a list or database that meets the conditions that you give.
- AVERAGEIF function (returns the average value according to the condition) in Excelthe averageif () function returns the average value of all selected cells that meet the conditions you specify.