Mehrere Zelleninhalte in einer Zelle darstellen

Hallo,

Ich möchte in einer Zelle den Inhalt (Text) von mehreren anderen Zellen ausgeben. Das Ganze soll jeweils durch Komma getrennt werden, allerdings soll kein Komma gesetzt werden, falls der Zelleninhalt leer ist - sonst stünden da, wenn alle Zellen leer sind, ja nur Kommas.

Daher entfällt wohl die einfache Variante
=Feld1&","&Feld2&","&Feld3

Gibts eine Möglichkeit, sowas in Excel zu realisieren? Oder muss ich mit „leeren“ Kommas leben?

Daher entfällt wohl die einfache Variante
=Feld1&","&Feld2&","&Feld3

Gibts eine Möglichkeit, sowas in Excel zu realisieren?

Hallo Holger,

das geht schon in Excel.
Mit Vba zB so:
=Liste(A1;A2;A5)
bzw.
=Liste(A1:A2;A5)

Mit normalen excelformeln geht es aber auch.
Um wieviele Zellen geht es denn max.?

Gruß
Reinhard

Hallo Reinhard,

Insgesamt sollen maximal die ersten sechs Zellen einer Tabellenspalte dargestellt werden, auch wenn davon z.B. nur drei mit Inhalt versehen sind. Konkret wäre das die Matrix R1:R6.
Wenn sich das Ganze mit normalen Formeln lösen ließe wäre würde ich das vorziehen!

Gruß,
Holger

Hallo
mal ein Ansatz:
=GLÄTTEN(WECHSELN(WENN(R1"";","&R1;"")&WENN(R2"";","&R2;"")&WENN(R3"";","&R3;"")&WENN(R4"";","&R4;"")&WENN(R5"";","&R5;"")&WENN(R6"";","&R6;"");",";"";1))

Gruß Holger

1 Like

ein Versuch
Hallo Holger,

Formel müßte noch wegen E5,E6 angepasst werden:

Tabellenblatt: [Mappe1]!Tabelle2
 │ A │ B │ C │ D │ E │
──┼──────┼───────┼──────────┼─────────┼─────────────────────────────┤
1 │ Hans │ Peter │ Brigitte │ Claudia │ Hans,Peter,Brigitte,Claudia │
──┼──────┼───────┼──────────┼─────────┼─────────────────────────────┤
2 │ Hans │ │ Brigitte │ Claudia │ Hans,Brigitte,Claudia │
──┼──────┼───────┼──────────┼─────────┼─────────────────────────────┤
3 │ Hans │ │ │ Claudia │ Hans,Claudia │
──┼──────┼───────┼──────────┼─────────┼─────────────────────────────┤
4 │ Hans │ Peter │ Brigitte │ │ Hans,Peter,Brigitte │
──┼──────┼───────┼──────────┼─────────┼─────────────────────────────┤
5 │ │ Peter │ Brigitte │ Claudia │ ,Peter,Brigitte,Claudia │
──┼──────┼───────┼──────────┼─────────┼─────────────────────────────┤
6 │ │ Peter │ │ Claudia │ ,Peter,Claudia │
──┴──────┴───────┴──────────┴─────────┴─────────────────────────────┘
Benutzte Formeln:
E1: =WECHSELN(WECHSELN("#"&A1&"#"&",#"&B1&"#"&",#"&C1&"#"&",#"&D1&"#";",##";"");"#";"")
E2: =WECHSELN(WECHSELN("#"&A2&"#"&",#"&B2&"#"&",#"&C2&"#"&",#"&D2&"#";",##";"");"#";"")
E3: =WECHSELN(WECHSELN("#"&A3&"#"&",#"&B3&"#"&",#"&C3&"#"&",#"&D3&"#";",##";"");"#";"")
E4: =WECHSELN(WECHSELN("#"&A4&"#"&",#"&B4&"#"&",#"&C4&"#"&",#"&D4&"#";",##";"");"#";"")
E5: =WECHSELN(WECHSELN("#"&A5&"#"&",#"&B5&"#"&",#"&C5&"#"&",#"&D5&"#";",##";"");"#";"")
E6: =WECHSELN(WECHSELN("#"&A6&"#"&",#"&B6&"#"&",#"&C6&"#"&",#"&D6&"#";",##";"");"#";"")

A1:E6
haben das Zahlenformat: Standard

Tabellendarstellung erreicht mit dem Code in FAQ:2363

Gruß
Reinhard

Hallo Reinhard,

Formel müßte noch wegen E5,E6 angepasst werden

da ich mich nicht mit fremden (deinen) Federn schmücken möchte, muss ich gleich zu Anfang klarstellen dass ich die Lösung nicht alleine gefunden habe. Ich habe nur (ohne im Einzelnen zu wissen was deine Formel macht) ein wenig mit deiner Formel herum experimentiert, und bin dadurch zu dem folgendem Ergebnis gekommen. Ohne deine Formel als Grundlage hätte ich keine Ahnung gehabt wie man das Problem lösen könnte.

=WENN(A1"";WECHSELN(WECHSELN("#"&A1&"#"&",#"&B1&"#"&",#"&C1&"#"&",#"&D1&"#";",##";"");"#";"");WECHSELN(WECHSELN(B1&"#"&",#"&C1&"#"&",#"&D1&"#";",##";"");"#";""))

Aber eventuell ist diese Lösung ja für Holger gar nicht zu gebrauchen, sondern er braucht die Lösung die ihm der andere Holger (ECHO [ON]) genannt hat.

Gruß
N.N

Zellbereich: [Mappe1]Tabelle1!A1:E11

\begin{tabular}{|c|c|c|c|c|c|}
\hline
& A & B & C & D & E\
\hline
1 & Hans & Peter & Claudia & Brigitte & Hans,Peter,Claudia,Brigitte\
\hline
2 & Hans & & Claudia & Brigitte & Hans,Claudia,Brigitte\
\hline
3 & Hans & & & Brigitte & Hans,Brigitte\
\hline
4 & Hans & Peter & Claudia & & Hans,Peter,Claudia\
\hline
5 & & Peter & Claudia & Brigitte & Peter,Claudia,Brigitte\
\hline
6 & & Peter & & Brigitte & Peter,Brigitte\
\hline
\end{tabular}

\begin{tabular}{|c|c|c|c|c|c|}
\hline
7 & & Peter & Claudia & & Peter,Claudia\
\hline
8 & & & & Brigitte & Brigitte\
\hline
9 & Hans & & & & Hans\
\hline
10 & & & & & \
\hline
11 & & & Claudia & Brigitte & Claudia,Brigitte\
\hline
\end{tabular}

Benutzte Formel:
E1: =WECHSELN(WECHSELN(WECHSELN("#"&$A1&"#"&",#"&$B1&"#"&",#"&$C1&"#"&
„,#“&$D1&"#";",##";"");"##,#";"");"#";"")
usw. in E

Gruß
Reinhard

1 Like

Es fehlen die Leerzeichen nach den Kommas
http://de.wikipedia.org/wiki/Plenk#Klemp

.

http://de.wikipedia.org/wiki/Plenk#Klemp

Hallo Grußlose,

Formel in G (www.excelformeln.de) versagt wenn Leerzeichen in
den Textzellen. Sieht man in Zeile 3 u. 8.
In so Fällen nimmt man z.B. Formel in H.

@UP, Übersichtlicher sind die Formeln in S die als Hilfsspalte
benutzt wird. In S6 steht das Gesamtergebnis.

Tabellenblatt: [Mappe1]!Tabelle1
 │ A │ B │ C │ D │ E │ F │ G │ H │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 1 │ a │ b │ c │ d │ e │ f │ a, b, c, d, e, f │ a, b, c, d, e, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 2 │ │ b │ c │ d │ e │ f │ b, c, d, e, f │ b, c, d, e, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 3 │ a │ b │ │ d d │ e │ f │ a, b, d, d, e, f │ a, b, d d, e, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 4 │ a │ b │ c │ d │ e │ f │ a, b, c, d, e, f │ a, b, c, d, e, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 5 │ a │ b │ c │ d │ e │ │ a, b, c, d, e │ a, b, c, d, e │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 6 │ │ b │ c │ d │ e │ │ b, c, d, e │ b, c, d, e │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 7 │ │ b │ │ d │ e │ │ b, d, e │ b, d, e │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 8 │ │ │ c │ d │ e e │ f │ c, d, e, e, f │ c, d, e e, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
 9 │ │ │ │ d │ e │ │ d, e │ d, e │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
10 │ │ │ │ │ │ │ │ │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
11 │ │ │ │ │ │ f │ f │ f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
12 │ a │ │ │ │ │ │ a │ a │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
13 │ a │ b │ │ │ │ │ a, b │ a, b │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
14 │ │ │ c │ │ │ f │ c, f │ c, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
15 │ a │ b │ c │ d │ e │ f │ a, b, c, d, e, f │ a, b, c, d, e, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
16 │ a │ b │ c │ d │ e │ f │ a, b, c, d, e, f │ a, b, c, d, e, f │
───┼───┼───┼───┼─────┼─────┼───┼──────────────────┼──────────────────┤
17 │ │ │ │ d │ │ │ d │ d │
───┴───┴───┴───┴─────┴─────┴───┴──────────────────┴──────────────────┘
Benutzte Formeln:
G1 : =WECHSELN(GLÄTTEN(A1&" "&B1&" "&C1&" "&D1&" "&E1&" "&F1);" ";", ")
usw. in G
H1 : =WECHSELN(WECHSELN(WECHSELN(WECHSELN("#"&$A1&"#"&",#"&$B1&"#"&",#"&$C1
&"#"&",#"&$D1&"#"&",#"&$E1&"#"&",#"&$F1&"#";",##";"");"##,#";"");"#";"
");",";", ")
usw. in H

A1:H17
haben das Zahlenformat: Standard




Tabellenblatt: [Mappe1]!Tabelle1
 │ R │ S │
──┼─────┼────────────────────┤
1 │ a │ a │
──┼─────┼────────────────────┤
2 │ s d │ a, s d │
──┼─────┼────────────────────┤
3 │ a │ a, s d, a │
──┼─────┼────────────────────┤
4 │ 4 │ a, s d, a, 4 │
──┼─────┼────────────────────┤
5 │ d │ a, s d, a, 4, d │
──┼─────┼────────────────────┤
6 │ 2 │ a, s d, a, 4, d, 2 │
──┴─────┴────────────────────┘
Benutzte Formeln:
S1: =WENN(R1="";"";R1)
S2: =WENN(S1="";"";S1)&WENN(ODER(R2="";S1="");"";", ")&WENN(R2="";"";R2)
S3: =WENN(S2="";"";S2)&WENN(ODER(R3="";S2="");"";", ")&WENN(R3="";"";R3)
usw. in S

R1:S6
haben das Zahlenformat: Standard

Tabellendarstellung erreicht mit dem Code in FAQ:2363

Gruß
Reinhard