Hallo!
Ich nutze folgendes Makro um die Zeilen einer Datenbank abwechselnd in grau und weiss zu färben…interssanterweise funktioniert es mittlerweile nicht mehr, sondern formatiert vereinzelte Blöcke komplett in grau (vorher hats aber funktioniert)
Sub formatierung()
Sheets(„Blatt1“).Select
For i = 6 To 10
wert = Cells(65536, i).End(xlUp).Row
If wert > wert1 Then
wert1 = wert
End If
Next
Range(Cells(1, 1), Cells(wert1, i - 1)).Select
Dim Counter As Integer
'For every row in the current selection…
For Counter = 1 To Selection.Rows.Count
'If the row is an odd number (within the selection)…
If Counter Mod 2 = 1 Then
Selection.Rows(Counter).Interior.ColorIndex = 15
Selection.Rows(Counter).Interior.Pattern = xlSolid
End If
Next
End Sub
Hat jemand ne Idee woran das liegen könnte und was ich zu ändern habe um zu meinem Ziel zu kommen?
Vielen Dank im Voraus
George