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
Sub
Worksheet_SelectionChange(
ByVal
Target
As
Range)
Dim
i
As
Range
Dim
bereich
As
Range
If
Target.Column = 1
Then
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
If
If
Target.Column = 4
Then
Set
bereich = Range(
"d1:d100"
)
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
If
End
Sub