Ich habe ein Problem mit einer Funktion. Diese arbeitet nicht wenn ich die Arbeitsmappe für andere Benutzer freigebe (Arbeitsmappe teilen).
Kann mir hier wer helfen? Die Funktion soll eine bestimmte Farbe in einem Bereich mit ein paar Bedingungen zählen.
Function CountCcolor(range_data As Range, criteria As Range, Funktion As Range) As Long
Dim datax As Range
Dim dataLegend As Range
Dim xcolor As Long
xcolor = criteria.Interior.ColorIndex
For Each datax In range_data
If datax.Interior.ColorIndex = xcolor And Cells(datax.Row, 3).Text = Funktion And Not datax.Text = "U"
CountCcolor = CountCcolor + 1
End If
Next datax
End Function