diese Makro wird eigentlich zügig ausgeführt, jedoch ist einige sekunden noch die Sanduhr am laufen, so als wenn das Makro noch beschäftigt wäre.
Ist am Code was ?falsch-suboptimal?
https://www.herber.de/bbs/user/86746.xls
Option Explicit
Private Sub CommandButton1_Click()
Dim f As Long
Dim i As Long
Dim loletzte As Long
Dim such1
Dim arrIn As Variant
Dim c As Range
such1 = Array("a", "b", "c", 1, 2, 3, "aa", 123)
loletzte = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
arrIn = Range("A1:F40") ' & loletzte)
Range("A1:F40").Interior.ColorIndex = xlNone
'Range("A1:F" & loletzte).Interior.ColorIndex = xlNone
For i = 1 To loletzte
For f = LBound(such1) To UBound(such1)
For Each c In UsedRange 'arrIn
If c = such1(f) Then
c.Interior.ColorIndex = 7
End If
Next c
Next f
Next i
End Sub
dankeschön
karl