HERBERS Excel-Forum - die Beispiele

Thema: Werte markieren, die größer als Parallelwerte sind

Home

Gruppe

Feature

Problem

Die Werte in Spalte C, die größer als die Parallelwerte in Spalte B sind, sollen mit grünem Hintergrund belegt werden.

Lösung
Unter "Bedingte Formatierung" folgende Formel eingeben: =C2>B2 und Format festlegen.
StandardModule: basMain

Sub NewCalc()
   Dim lRow As Long, lRowL As Long
   Dim dValue As Double
   Dim iCol As Integer
   Application.ScreenUpdating = False
   For iCol = 1 To 9 Step 2
      Columns(iCol).NumberFormat = "#,##0.00"
      lRowL = Cells(Rows.Count, iCol).End(xlUp).Row
      For lRow = 2 To lRowL
         If Not IsEmpty(Cells(lRow, iCol)) Then
            If IsNumeric(Cells(lRow, iCol)) Then
               dValue = Cells(lRow, iCol).Value
               dValue = dValue / 100
               dValue = dValue / 1.5
               Cells(lRow, iCol).Value = dValue
            End If
         End If
      Next lRow
   Next iCol
   Application.ScreenUpdating = True
End Sub

Beiträge aus dem Excel-Forum zu den Themen Feature und Bedingt

Bedingte Formatierung vor Copy/Paste schützen Bedingte Formatierung per VBA mit Schleife
bedingte Formatierung Bedingte Formatierung
Teilstringabfrage bei bedingter Formatierung Bedingte Formatierung mit UND Verknüpfung
Bedingte Formatierung Frage bedingte Formatierung mit mehreren Bedingungen
Bedingte Formattierung Bedingte Formatierung - kleiner als Fehler
bedingte formatierung per VBA Bedingte Formatierung bezogen auf 2. Zelle
bedingte Formatierung Bedingte Formatierung
wenn z.B. Zahl 12 dann grün (Bedingte Formatierung wenn z.B. Zahl 12 dann grün (Bedingte Formatierung
bedingte Formatierung für zellenbereich Bedingte Formatierung mit 2 Bedingungen
Bedingte Formatierung bedingte Formatierung bei 15 Kriterien
Bedingtes Nummernformat. Bedingte Formatierung
Bedingte Format. oder VBA? Bedingte Formatierung für gesamte Zeile?
Bedingte Formatierung-VBA? Bedingte Formatierung?!
bedingte formatierung per Makro Bedingte Formatierung
bedingte Formatierung sowie mit Datumsfeld Bedingte Formatierung - Zeilen gruppieren
Bedingte Formate Bedingte Formatierung mit Formel
Bedingte Codeausführung per Attribut bedingte Formatierung
Bedingte Formatierung anhalten Bedingte Formatierung - Dringend
Bedingte Formatierung Nach bestimmter bedingter Formatierung suchen
Bedingte Formatierung Automatisch schliessen ohne Speichern, bedingt
Bedingte Formateierung Bedingte Formatierungen - Datenbalken
Kompatibilität -Bedingte Formatierung NUR bedingte Formate übertragen
mehr als 3 bedingte formatierungen Bedingte Formatierung - gantt Diagramm
Bedingte Formatierung in Pivot_NICHT in SubTotals? Dreifach Bedingte Formatierung über VBA in Pivot
bedingte Formatierung und Formeln