habe ein Problem mit meiner Tabellenauswertung. Ich zähle in meiner Tabelle eine Farbe aus und lasse mir die Anzahl der gefärbten Zellen zB in Zelle A1 anzeigen. Das mache ich folgendermaßen.
VBA:
Option Explicit
Function FARBEZÄHLEN(Bereich As Range, Farbe As Byte) As Long
Application.Volatile
Dim c As Range
For Each c In Bereich
If c.Interior.ColorIndex = Farbe Then
FARBEZÄHLEN = FARBEZÄHLEN + 1
End If
Next c
End Function
In Zelle A1 dann folgendes:
=SUMME(FARBEZÄHLEN(C4:AG4;4))+SUMME(FARBEZÄHLEN(C10:AG10;4))+SUMME(FARBEZÄHLEN(C16:AG16;4))+SUMME(FARBEZÄHLEN(C22:AG22;4))+SUMME(FARBEZÄHLEN(C28:AG28;4))+SUMME(FARBEZÄHLEN(C34:AG34;4))+SUMME(FARBEZÄHLEN(C41:AG41;4))+SUMME(FARBEZÄHLEN(C47:AG47;4))+SUMME(FARBEZÄHLEN(C53:AG53;4))+SUMME(FARBEZÄHLEN(C59:AG59;4))+SUMME(FARBEZÄHLEN(C65:AG65;4))+SUMME(FARBEZÄHLEN(C71:AG71;4))
funktioniert wunderbar, aber ich möchte auch den Wert der Zelle die jeweils unter der gefärbten Zelle steht (in meinem Fall eine Zahl) ebenfalls in einer anderen Zelle addiert haben zB A2. Ich hab mich schon blöd gesucht, finde aber keine Lösung. Weiß einer von Euch Rat? Danke im Voraus
Gruß Kalle