Hallo,
ich habe eine Excel-Tabelle bei der ich wenn ich eine Zelle im Bereich a4:ba100 möchte das die erste Zelle in der Zeile färbt.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i As Range
Dim bereich As Range
Set bereich = Range("a1:a100")
For Each i In bereich
If i.Interior.ColorIndex <> 15 Then
i.Interior.ColorIndex = xlColorIndexNone
End If
Next i
If Cells(Selection.Row, 1).Interior.ColorIndex <> 10 Then
Cells(Selection.Row, 1).Interior.ColorIndex = 17
End If
End Sub
Das gleiche bräuchte ich jetzt aber auch noch für die Zellen in der 4. Reihe...
kann mir wer weiterhelfen ? |