AW: Zellfarbe per VBA / bedingte Formatierung
30.08.2010 20:47:04
ransi
HAllo
ALso 16500 Zellen sollten noch kein Problem darstellen.
Teste mal sowas:
' **********************************************************************
' Modul: Tabelle1 Typ: Element der Mappe(Sheet, Workbook, ...)
' **********************************************************************
Option Explicit
Private Sub Worksheet_Calculate()
Dim arr As Variant
Dim L As Long
Dim I As Integer
arr = Range("A1:ET110") 'Range("a1").CurrentRegion
On Error Resume Next
Application.ScreenUpdating = False
For L = 1 To UBound(arr)
For I = 1 To UBound(arr, 2)
Select Case arr(L, I)
Case "A": Cells(L, I).Interior.ColorIndex = 3 'Anpassen
Case "B": Cells(L, I).Interior.ColorIndex = 30 'Anpassen
Case "C": Cells(L, I).Interior.ColorIndex = 21 'Anpassen
Case "D": Cells(L, I).Interior.ColorIndex = 47 'Anpassen
Case "E": Cells(L, I).Interior.ColorIndex = 4 'Anpassen
Case "F": Cells(L, I).Interior.ColorIndex = 27 'Anpassen
End Select
Next
Next
Application.ScreenUpdating = True
End Sub
ransi