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.
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