VBA
Public Sub EsempioFormattazione()
Dim V_row As Integer
Dim V_cut As Integer
Dim Color1, Color2 As Integer
V_row = 2
V_cut = Range("H2").Value
Color1 = Range("H3").Interior.ColorIndex
Color2 = Range("H4").Interior.ColorIndex
While Cells(V_row, 5).Value <> ""
If Cells(V_row, 5) > V_cut Then
Range(Cells(V_row, 1), Cells(V_row, 5)).Interior.ColorIndex = Color1
Else
Range(Cells(V_row, 1), Cells(V_row, 5)).Interior.ColorIndex = Color2
End If
V_row = V_row + 1
Wend
Exit Sub
End Sub
Public Sub ResetFormattazione()
Dim V_row As Integer
V_row = 2
While Cells(V_row, 5).Value <> ""
Range(Cells(V_row, 1), Cells(V_row, 5)).Interior.ColorIndex = 0
V_row = V_row + 1
Wend
Exit Sub
End Sub