Array-Matrix
13.05.2017 14:02:52
Niclaus
Ich beschäftige mich mit Arrays und brauche Eure Hilfe.
In A1 steht das Wort "Excel". Aufgesplittet in die ANSI-Codes erhalte ich "69,120,99,101,108".
In C2 erhalte ich diese Werte auf ganz traditionelle Art mit =CODE(TEIL(A1;1;99)) & "," & CODE(TEIL(A1;2;99)) & "," & CODE(TEIL(A1;3;99)) & "," & CODE(TEIL( _ A1;4;99)) & "," & CODE(TEIL(A1;5;99))
Ich möchte diese Formel in eine Array-Formel umwandeln, also ohne VBA. Ich schaffe es aber nicht. Kann mir jemand einen Tipp dazu geben?
Mit VBA funktioniert das mit dieser Function (in C3):
Function codezelle(zelle)
lz = Len(zelle)
For i = 1 To lz
cz = Asc(Mid(zelle, i, 1))
cztot = cztot & "," & cz
Next
codezelle = Mid(cztot, 2, 9999)
End Function
In C6 und C7 habe ich die Summe dieser Code-Werte berechnet. Hier klappt es mit der Array _ Formel in C7:
=SUMME(CODE(TEIL(A1;ZEILE(INDIREKT("A1:A"&LÄNGE(A1)));1)))
Eingegeben als Matrix-Formel mit CTRL-SHIFT-RETURN.
Der langen Rede kurzer Sinn: Wie wandle ich die Formel in C2 in eine Array-Formel um, analog zur Formel in C7?
Vielen Dank für eure Hilfe!
Niclaus
Tabelle3
A | B | C | |
1 | Excel | Aufsplittung in Codes | |
2 | primitive Formel: | 69,120,99,101,108 | |
3 | VBA-Function: | 69,120,99,101,108 | |
4 | |||
5 | Summe der Codes | ||
6 | primitive Formel: | 497 | |
7 | Array-Formel: | 497 |
Formeln der Tabelle | ||||||||||
| ||||||||||
Enthält Matrixformel: Umrandende { } nicht miteingeben, sondern Formel mit STRG+SHIFT+RETURN abschließen! | ||||||||||
Matrix verstehen |
Excel Tabellen im Web darstellen >> Excel Jeanie HTML 4.8