Aller au contenu
GridBelt
  • Test Excel
  • Exercices
  • Programmes
  • Tarifs
Se connecter
Commencer le test gratuit
  • Test Excel
  • Exercices
  • Programmes
  • Tarifs
Se connecterCréer un compte
Commencer le test gratuit
GridBelt

Entraînez-vous sur Excel dans votre navigateur.

Test Excel

  • Niveau 1 : Débutant
  • Niveau 2 : Intermédiaire
  • Niveau 3 : Expert
  • Test Excel en 7 jours
  • Classement
  • Test Excel en entretien d’embauche
  • Évaluation Excel d’Indeed

Exercices

  • Tous les exercices
  • Programmes
  • Pour débutants

Guides

  • Formules Excel
  • Raccourcis Excel

Entreprise

  • À propos
  • Tarifs
  • Comment nous corrigeons

© GridBelt. Tous droits réservés.

  • Politique de confidentialité
  • Conditions d’utilisation
  • Politique de remboursement

Excel est une marque commerciale de Microsoft Corporation. Indeed, TestGorilla, SHL et les autres marques sont la propriété de leurs détenteurs respectifs. GridBelt est un site d’entraînement indépendant ; il n’est affilié ni à Microsoft, ni à TestGorilla, ni à SHL, ni à Indeed, et n’est ni cautionné ni sponsorisé par ces sociétés.

  1. Exercices
  2. /
  3. Text functions

TEXTJOIN practice: one tag list per product from 5 columns

  • Intermédiaire
  • ~5 min
  • Text functions

Énoncé en anglais

The web-shop catalogue stores up to 5 tags per product in separate columns (C to G), and the 40 products use the slots unevenly: 31 rows have empty slots between tags, 6 use all five, 7 have a single tag. The storefront import wants one field per product with the tags separated by a comma and a space — for Standing desk that is "indoor, eco, fragile". Build that field in H2:H41 without producing stray separators for the empty slots.

Ce que vous devez faire

  1. 1Click H2 and type =TEXTJOIN(", ",TRUE,C2:G2): the first argument is the delimiter, TRUE means "ignore empty cells", and C2:G2 is the range of tag slots.
  2. 2Press Enter — H2 shows indoor, eco, fragile. Compare with what =C2&", "&D2&", "&E2&", "&F2&", "&G2 would give: "indoor, , eco, , fragile", with separators for the empty slots.
  3. 3Fill H2 down to H41 (double-click the fill handle, or select H2:H41 and press Ctrl+D on Windows / ⌘D on Mac).
  4. 4Spot-check a product with a single tag — its cell must contain just the tag, no comma.

Cellules de réponse

Correction

Saisissez votre formule dans la grille, appuyez sur Enter, puis cliquez sur Vérifier. Nous corrigeons la valeur de chaque cellule de réponse et la formule qui la produit.

Tâches

  1. Non vérifiéIn H2, use TEXTJOIN to combine the tags in C2:G2 with ", " as the delimiter and empty slots ignored, then fill down to H41.

Ordinateur recommandé pour les tâches dans la feuille de calcul. La feuille défile à l’intérieur de ce cadre.

StartInsertFormulasDataView
A1fxPréparation de votre classeur…
A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sheet1

Saisissez votre formule dans la feuille, puis vérifiez.

À propos de cet exercice

Un jeu de données de 40 lignes sur une feuille, une cellule de réponse, environ 5 minutes. Corrigé dans votre navigateur : la valeur et la formule qui la produit, avec des indications sur la correction à apporter.

Comment le résoudre

  • H2=TEXTJOIN(", ",TRUE,C2:G2)

TEXTJOIN takes a delimiter once, a flag that says whether empty cells are skipped, and then the cells to join — so one short formula replaces a chain of & operators with a separator between every pair. With ignore_empty set to TRUE the blank slots simply disappear: row 2 gives "indoor, eco, fragile" instead of "indoor, , eco, , fragile". The range C2:G2 is relative, so filling the formula down moves it to C3:G3, C4:G4 and so on.

Pitfall 1: TEXTJOIN(", ",FALSE,…) or CONCAT(C2,", ",D2,…) keep a separator for every slot and produce ", ," runs and trailing commas; cleaning those afterwards with SUBSTITUTE is fragile — use TRUE. Pitfall 2: a cell that looks empty but holds a formula returning "" counts as empty for TEXTJOIN (good), while a single space " " does not — TRIM the sources if the import pads blanks with spaces. Pitfall 3: TEXTJOIN returns #VALUE! once the result exceeds 32,767 characters — irrelevant for tags, relevant when joining whole columns of comments. Version note: TEXTJOIN and CONCAT arrived with Excel 2019 / 365; in Excel 2016 and earlier the only option is =C2&IF(D2<>"",", "&D2,"")&… or a helper column. The reverse operation is TEXTSPLIT(H2,", ") (Excel 365 only); for a conditional join — only tags of a given type — combine TEXTJOIN with FILTER: =TEXTJOIN(", ",TRUE,FILTER(C2:G2,C2:G2<>"eco")). Multiple delimiters are allowed: TEXTJOIN({", "," and "},TRUE,…) alternates them, handy for "a, b and c" sentences.

Autres méthodes valables

  • =TEXTJOIN(", ",1,C2:G2) — 1 is accepted for TRUE
  • =TEXTJOIN(", ",TRUE,C2,D2,E2,F2,G2) — the slots listed individually
  • =TEXTJOIN(", ",TRUE,FILTER(C2:G2,C2:G2<>"")) — Excel 365; explicit filter instead of ignore_empty

Erreurs fréquentes

Setting ignore_empty to FALSE (or chaining the slots with &): the empty slots become extra separators and row 2 reads "indoor, , eco, , fragile" instead of "indoor, eco, fragile".

Comment nous corrigeons

Toute formule qui produit le bon résultat est acceptée, sauf si la tâche nomme une fonction : une autre fonction rapporte alors la moitié des points. Nous comparons les valeurs avec une petite tolérance et ignorons la casse et les espaces dans le texte. Un nombre correct saisi à la main au lieu d’une formule rapporte la moitié des points. Les tâches sur plusieurs cellules rapportent tous les points avec 100 % de cellules justes, la moitié à partir de 50 %. Lorsque c’est pertinent, nous modifions aussi une cellule d’entrée sur une copie de votre feuille et vérifions que votre formule suit.

Réponses calculées selon les règles d’Excel 365 et vérifiées dans notre correcteur le 16 novembre 2026. Auteur : GridBelt team.

Exercices associés

  • Full name with CONCAT or &Débutant, ~4 min
  • Split email into user and domain (FIND/LEFT/RIGHT or TEXTBEFORE/TEXTAFTER)Intermédiaire, ~7 min
  • Clean padded, lower-case names with TRIM and PROPERIntermédiaire, ~6 min

Référence de la fonction

Documentation officielle

Exercice suivant

Days to deadline and tenure in years (TODAY, DATEDIF)