Excel shows that message because, in a German-language installation, the list-separator inside formulas is the semicolon ( ; ), not the comma ( , ).
When Excel parses
keys, A2:A100
it treats the whole expression "keys, A2:A100" as a single argument. The very first argument of LET must be a legal variable name, but the string keys, A2:A100 is not a valid name, so Excel raises the error.
Fix: replace every comma that separates function arguments by a semicolon (keep the comma that sits inside quotation marks, because that one is part of the text you want to split).
Corrected version (German function names + German separators):
=LET(
keys; A2:A100;
lists; B2:B100;
split_lists; TEXTTEILEN(lists; ","); /* Komma bleibt, ist Teil des Textes */
flattened_lists; ZUSPALTE(split_lists; 1);
repeated_keys; INDEX(
keys;
GANZZAHL(
SEQUENZ(ZEILEN(flattened_lists); 1; 1; 1/ZEILEN(split_lists))
)
);
HSTAPELN(repeated_keys; flattened_lists)
)
Alternativen:
• Ändern Sie in den Windows/Excel-Regionseinstellungen das Listentrennzeichen von ; auf , – dann funktionieren Kommas, aber alle bestehenden deutschen Formeln müssten ebenfalls umgestellt werden.
• Bleiben Sie bei den regional üblichen Semikolons – dann genügt wie oben das einfache Suchen-und-Ersetzen von „, ” durch „;”.