{"id":6641,"date":"2025-07-15T13:34:48","date_gmt":"2025-07-15T13:34:48","guid":{"rendered":"https:\/\/functiontranslator.com\/nbcar-lenb\/"},"modified":"2021-02-26T08:09:40","modified_gmt":"2021-02-26T08:09:40","slug":"len-lenbs","status":"publish","type":"post","link":"https:\/\/functiontranslator.com\/fr\/len-lenbs\/","title":{"rendered":"NBCAR, LENB"},"content":{"rendered":"<h2>Introduction aux fonctions pour calculer la longueur d&rsquo;une cha\u00eene de caract\u00e8res<\/h2>\n<p>Le traitement des donn\u00e9es textuelles est un aspect crucial de l&rsquo;analyse de donn\u00e9es. Dans Microsoft Excel et Google Sheets, certaines fonctions permettent de mesurer la longueur d&rsquo;une cha\u00eene de caract\u00e8res. Ces fonctions s&rsquo;av\u00e8rent indispensables pour manipuler et valider les donn\u00e9es textuelles. Nous examinons ici les fonctions <code>LEN<\/code> et <code>LENB<\/code> de Excel ainsi que leurs \u00e9quivalents, <code>NBCAR<\/code> et <code>LENB<\/code>, dans Google Sheets.<\/p>\n<h2>Syntaxe et exemples d&rsquo;utilisation<\/h2>\n<p>La syntaxe de ces fonctions est simple :<\/p>\n<ul>\n<li><b>Excel :<\/b> <code>LEN(texte)<\/code><\/li>\n<li><b>Google Sheets :<\/b> <code>NBCAR(texte)<\/code><\/li>\n<\/ul>\n<p>Exemple dans Excel :<\/p>\n<pre><code>=LEN(\"Bonjour!\") -- Renvoie 8, car il y a 8 caract\u00e8res dans \"Bonjour!\"<\/code><\/pre>\n<p>Exemple dans Google Sheets :<\/p>\n<pre><code>=NBCAR(\"Bonjour!\") -- Renvoie \u00e9galement 8<\/code><\/pre>\n<p>La fonction <code>LENB<\/code> dans Excel compte le nombre de bytes utilis\u00e9s pour repr\u00e9senter les caract\u00e8res d&rsquo;une cha\u00eene, ce qui est particuli\u00e8rement utile pour les langues o\u00f9 chaque caract\u00e8re peut occuper plus d&rsquo;un byte.<\/p>\n<pre><code>=LENB(\"\u00c9cole\") -- Renvoie 7, car \"\u00c9\" utilise deux bytes et chaque autre caract\u00e8re un byte.<\/code><\/pre>\n<h2>Sc\u00e9narios d&rsquo;application pratique<\/h2>\n<p><b>Sc\u00e9nario 1 : Validation de donn\u00e9es saisies<\/b><\/p>\n<p>Pour v\u00e9rifier qu&rsquo;un code postal saisi contient exactement 5 caract\u00e8res, on peut utiliser :<\/p>\n<pre><code>=IF(LEN(code_postal) = 5, \"Valide\", \"Invalide\")<\/code><\/pre>\n<p>Dans Google Sheets, cela se traduirait par :<\/p>\n<pre><code>=IF(NBCAR(code_postal) = 5, \"Valide\", \"Invalide\")<\/code><\/pre>\n<p>Cette m\u00e9thode confirme que le code postal respecte les crit\u00e8res requis avant d&rsquo;\u00eatre enregistr\u00e9 ou trait\u00e9.<\/p>\n<p><b>Sc\u00e9nario 2 : Extraction de sous-cha\u00eenes variables<\/b><\/p>\n<p>Si nous avons une liste de noms et pr\u00e9noms concat\u00e9n\u00e9s s\u00e9par\u00e9s par une virgule, pour extraire le pr\u00e9nom, nous pouvons faire :<\/p>\n<pre><code>=RIGHT(nom_complet, LEN(nom_complet) - FIND(\",\", nom_complet) - 1)<\/code><\/pre>\n<p>Cette formule identifie la position de la virgule, soustrait cette position de la longueur totale et utilise le r\u00e9sultat pour isoler le pr\u00e9nom. Cette m\u00e9thode garantit le bon fonctionnement quel que soit la longueur du nom de famille.<\/p>\n<h2>Conclusion<\/h2>\n<p>Les fonctions <code>LEN<\/code> et <code>LENB<\/code> dans Excel et <code>NBCAR<\/code> dans Google Sheets jouent un r\u00f4le essentiel dans le traitement des cha\u00eenes de caract\u00e8res lors de l&rsquo;analyse des donn\u00e9es. Leur bonne utilisation peut grandement simplifier la validation, le formatage et l&rsquo;extraction d&rsquo;informations pr\u00e9cieuses \u00e0 partir de textes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Renvoie le nombRe de caRact\u00e8Res contenus dans une cha\u00eene de texte<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[314],"tags":[],"class_list":["post-6641","post","type-post","status-publish","format-standard","hentry","category-texte"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe<\/title>\n<meta name=\"description\" content=\"Pr\u00e9sentation de la fonction LEN, LENBs (NBCAR, LENB) d\u2019Excel et Google Sheets. Syntaxe d\u00e9taill\u00e9e et exemples pratiques d&#039;utilisation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/functiontranslator.com\/fr\/len-lenbs\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe\" \/>\n<meta property=\"og:description\" content=\"Pr\u00e9sentation de la fonction LEN, LENBs (NBCAR, LENB) d\u2019Excel et Google Sheets. Syntaxe d\u00e9taill\u00e9e et exemples pratiques d&#039;utilisation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/functiontranslator.com\/fr\/len-lenbs\/\" \/>\n<meta property=\"og:site_name\" content=\"Function Translator\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-15T13:34:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-26T08:09:40+00:00\" \/>\n<meta name=\"author\" content=\"glavadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"glavadmin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/functiontranslator.com\/fr\/len-lenbs\/\",\"url\":\"https:\/\/functiontranslator.com\/fr\/len-lenbs\/\",\"name\":\"Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe\",\"isPartOf\":{\"@id\":\"https:\/\/functiontranslator.com\/no\/#website\"},\"datePublished\":\"2025-07-15T13:34:48+00:00\",\"dateModified\":\"2021-02-26T08:09:40+00:00\",\"author\":{\"@id\":\"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389\"},\"description\":\"Pr\u00e9sentation de la fonction LEN, LENBs (NBCAR, LENB) d\u2019Excel et Google Sheets. Syntaxe d\u00e9taill\u00e9e et exemples pratiques d'utilisation.\",\"breadcrumb\":{\"@id\":\"https:\/\/functiontranslator.com\/fr\/len-lenbs\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/functiontranslator.com\/fr\/len-lenbs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/functiontranslator.com\/fr\/len-lenbs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Fonctions Excel\",\"item\":\"https:\/\/functiontranslator.com\/fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Texte\",\"item\":\"https:\/\/functiontranslator.com\/fr\/texte\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"NBCAR, LENB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/functiontranslator.com\/no\/#website\",\"url\":\"https:\/\/functiontranslator.com\/no\/\",\"name\":\"Function Translator\",\"description\":\"Excel function translator\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/functiontranslator.com\/no\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389\",\"name\":\"glavadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g\",\"caption\":\"glavadmin\"},\"sameAs\":[\"https:\/\/functiontranslator.com\"],\"url\":\"https:\/\/functiontranslator.com\/fr\/author\/glavadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe","description":"Pr\u00e9sentation de la fonction LEN, LENBs (NBCAR, LENB) d\u2019Excel et Google Sheets. Syntaxe d\u00e9taill\u00e9e et exemples pratiques d'utilisation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/functiontranslator.com\/fr\/len-lenbs\/","og_locale":"fr_FR","og_type":"article","og_title":"Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe","og_description":"Pr\u00e9sentation de la fonction LEN, LENBs (NBCAR, LENB) d\u2019Excel et Google Sheets. Syntaxe d\u00e9taill\u00e9e et exemples pratiques d'utilisation.","og_url":"https:\/\/functiontranslator.com\/fr\/len-lenbs\/","og_site_name":"Function Translator","article_published_time":"2025-07-15T13:34:48+00:00","article_modified_time":"2021-02-26T08:09:40+00:00","author":"glavadmin","twitter_card":"summary_large_image","twitter_title":"Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe","twitter_misc":{"\u00c9crit par":"glavadmin","Dur\u00e9e de lecture estim\u00e9e":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/functiontranslator.com\/fr\/len-lenbs\/","url":"https:\/\/functiontranslator.com\/fr\/len-lenbs\/","name":"Fonction LEN, LENBs (NBCAR, LENB) dans Excel : comment \u00e7a marche, exemples et syntaxe","isPartOf":{"@id":"https:\/\/functiontranslator.com\/no\/#website"},"datePublished":"2025-07-15T13:34:48+00:00","dateModified":"2021-02-26T08:09:40+00:00","author":{"@id":"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389"},"description":"Pr\u00e9sentation de la fonction LEN, LENBs (NBCAR, LENB) d\u2019Excel et Google Sheets. Syntaxe d\u00e9taill\u00e9e et exemples pratiques d'utilisation.","breadcrumb":{"@id":"https:\/\/functiontranslator.com\/fr\/len-lenbs\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/functiontranslator.com\/fr\/len-lenbs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/functiontranslator.com\/fr\/len-lenbs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Fonctions Excel","item":"https:\/\/functiontranslator.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Texte","item":"https:\/\/functiontranslator.com\/fr\/texte\/"},{"@type":"ListItem","position":3,"name":"NBCAR, LENB"}]},{"@type":"WebSite","@id":"https:\/\/functiontranslator.com\/no\/#website","url":"https:\/\/functiontranslator.com\/no\/","name":"Function Translator","description":"Excel function translator","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/functiontranslator.com\/no\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Person","@id":"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/87663eece497ca58643166ecb09f1389","name":"glavadmin","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/functiontranslator.com\/no\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/03ccd9347c5339db75deede5a8c5b2bf1d40e0bce26a5251fcaac6331d381db8?s=96&d=mm&r=g","caption":"glavadmin"},"sameAs":["https:\/\/functiontranslator.com"],"url":"https:\/\/functiontranslator.com\/fr\/author\/glavadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/posts\/6641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/comments?post=6641"}],"version-history":[{"count":2,"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/posts\/6641\/revisions"}],"predecessor-version":[{"id":29652,"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/posts\/6641\/revisions\/29652"}],"wp:attachment":[{"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/media?parent=6641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/categories?post=6641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/functiontranslator.com\/fr\/wp-json\/wp\/v2\/tags?post=6641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}