Option
Explicit
Sub
TestIt()
Dim
Zeile
As
Long
Dim
Spalte
As
Long
Dim
myMax
As
Double
For
Zeile = 17
To
20
myMax = Krücke(Zeile)
For
Spalte = 7
To
115
Step
2
If
Cells(Zeile, Spalte).Value = myMax
Then
Cells(Zeile, Spalte).Interior.ColorIndex = 6
Next
Spalte
Next
Zeile
End
Sub
Private
Function
Krücke(myRow
As
Long
)
As
Double
Dim
arrChk()
As
Variant
Dim
x
As
Long
, y
As
Long
arrChk = Range(Cells(myRow, 9), Cells(myRow, 115))
With
Columns(Columns.Count)
For
x = LBound(arrChk, 2)
To
UBound(arrChk, 2)
Step
2
y = y + 1
.Cells(y).Value = arrChk(1, x)
Next
x
Krücke = WorksheetFunction.Max(Range(.Cells(1), .Cells(y)))
.Clear
End
With
End
Function