Excel LEN in French: Function Name and Usage
In this article
Excel's LEN function in French is called NBCAR, which stands for 'nombre de caractères' (number of characters). It performs the exact same task as LEN—counting the total number of characters in a text string, including spaces and punctuation.
Background and Localization of Excel Functions
Microsoft Excel adapts its interface and function names to match the language settings of the user's operating system or Office installation. This localization helps users who are more comfortable working in their native language. The English function LEN becomes NBCAR in French because it directly translates the purpose: counting characters. This change is not unique to French—most Excel functions are translated into dozens of languages. For example, SUM becomes SOMME in French, and VLOOKUP becomes RECHERCHEV. These translations are standardized across all French-language versions of Excel, whether used in France, Canada, Belgium, or Switzerland.
How NBCAR Works in Practice
The NBCAR function follows the same logic as LEN. It takes one argument: a text string or a reference to a cell containing text. The function then returns the total number of characters in that string. This includes:
- Letters (a–z, A–Z, and accented characters like é, à, ç)
- Numbers (0–9)
- Spaces (including multiple or leading/trailing spaces)
- Punctuation marks (.,!?"'(); etc.)
- Symbols (@, #, $, %, &, etc.)
For example:
=NBCAR("Bonjour")returns 7=NBCAR("Hello World")returns 11 (including the space)=NBCAR(A1)where A1 contains " Test " returns 8 (two leading and two trailing spaces)
This behavior is identical to LEN in English Excel, ensuring consistent functionality across languages.
Entering and Using NBCAR in French Excel
To use the NBCAR function, follow these steps:
- Open Excel with French language settings enabled
- Select the cell where you want the result to appear
- Type
=NBCAR(followed by either: - A direct text string in quotes (e.g.,
="Bonjour") - A cell reference (e.g.,
A1) - Close the parenthesis and press Enter
Example: If cell B3 contains "Paris, 75008", then =NBCAR(B3) returns 12. The comma and space are both counted.
Note: If you try to use LEN in a French Excel environment, Excel will either return an error or prompt you to convert the formula, depending on version and settings.
Common Problems and Errors with NBCAR
Despite its simplicity, users may encounter issues when using NBCAR:
- #NAME? error: This usually means Excel doesn’t recognize the function name. It may occur if the formula is typed as
LENin a French setup, or if there’s a spelling mistake (e.g.,NBCARmisspelled asNBCARSorNBCARS). - Unexpected counts: If the result seems too high, check for hidden spaces using the
LONGUEURfunction (note:LONGUEURis an older synonym forNBCARand still works in some versions) or useSTXT(MID) to inspect parts of the string. - Numbers formatted as text: If a cell contains a number stored as text (e.g., '00123),
NBCARwill count all digits and any leading apostrophe (though the apostrophe is not visible, it’s not stored—only the text representation is counted). - Line breaks: In cells with Alt+Enter line breaks, each line break counts as one character (char 10 or 13). Use
SUBSTITUEwithCHAR(10)orCHAR(13)to remove them before counting if needed.
A common misconception is that NBCAR excludes spaces or punctuation. It does not—every character is counted.
Comparison with Related Text Functions in French Excel
NBCAR is often used alongside other text functions in French Excel. Understanding how it relates to these functions improves efficiency:
- GAUCHE (LEFT): Extracts a specified number of characters from the start of a string. Often combined with
NBCARto extract all but the last few characters. - DROITE (RIGHT): Extracts characters from the end. Useful when used with
NBCARto get the last N characters. - STXT (MID): Extracts text from the middle.
NBCARcan help determine the length of the substring to extract. - SUBSTITUE (SUBSTITUTE): Replaces text. Can be used to remove spaces before using
NBCARfor a space-free count. - STXT and
TROUVE(FIND): Used together to locate and extract text;NBCARhelps validate input length.
Example: To extract everything before the last comma in a French address, you might use GAUCHE(A1; NBCAR(A1) - TROUVE("@"; SUBSTITUE(A1; ","; "@"; NBCAR(A1) - NBCAR(SUBSTITUE(A1; ","; "")))))—a complex but practical use of NBCAR.
Alternatives and Workarounds
While NBCAR is the standard function for character counting, there are alternative approaches:
- Using LEN in English mode: If you switch Excel’s language to English,
LENbecomes available. However, this affects all function names and may confuse users. - Power Query: In Excel's Get & Transform tools, you can use
Text.Lengthin M language to count characters during data transformation. - VBA (Visual Basic for Applications): The
Len()function in VBA works the same regardless of Excel’s language setting. For example:MsgBox Len(Range("A1").Value)will return the character count even in French Excel. - Helper columns: Combine
NBCARwithSUBSTITUEto count only specific characters. For example,=NBCAR(A1) - NBCAR(SUBSTITUE(A1; " "; ""))counts spaces in a cell.
These alternatives are useful in mixed-language environments or when building reusable templates.
Frequently Asked Questions
Is NBCAR the same as LEN in Excel?
Yes, NBCAR is the French equivalent of the English LEN function. Both count all characters in a text string, including letters, numbers, spaces, and punctuation. The functionality is identical—only the name differs based on language settings.
Can I use LEN instead of NBCAR in French Excel?
No, you cannot use LEN in a French Excel environment unless you change the language settings. Excel will not recognize LEN and will return a #NAME? error. Always use NBCAR when working in French.
Does NBCAR count accented characters correctly?
Yes, NBCAR counts accented characters like é, è, à, ô, and ç as single characters. Each accented letter is treated as one character, just like in English Excel.
Why does NBCAR include spaces in the count?
NBCAR counts every character in the string, including spaces, because spaces are valid text characters. If you want to exclude spaces, use a formula like =NBCAR(A1) - NBCAR(SUBSTITUE(A1;" ";"")) to subtract the number of spaces.
Is there a maximum text length NBCAR can count?
NBCAR can count up to 32,767 characters—the maximum number of characters a single Excel cell can hold. If the text exceeds this (e.g., in a merged string), only the content within the cell limit is counted.
Does NBCAR work the same in Excel Online and mobile apps?
Yes, NBCAR works identically in Excel Online, Windows, Mac, iOS, and Android apps, as long as the language is set to French. The function name and behavior are consistent across platforms.