Sub rasta()
Dim n As Integer
Dim plage1 As Range
Dim plage2 As Range
Dim plage_totale As Range
Dim ValMax(1 To 5) As Variant
Dim ValMin(1 To 5) As Variant
'Selection de la plage de recherche
'Range("c1:c52").Select
For n = 8 To 8
Range(Cells(21, n), Cells(37, n)).Name = "plage1"
Range(Cells(39, n), Cells(79, n)).Name = "plage2"
Set plage_totale = Application.Union(Range("plage1"), Range("plage2"))
plage_totale.Select
Selection.Font.Bold = False
Selection.Interior.ColorIndex = xlwhite
For i = LBound(ValMax) To UBound(ValMax)
ValMax(i) = Application.WorksheetFunction.Large(Selection, i)
[COLOR="Red"]If Selection(1).NumberFormat = "#,##0_);[Red](#,##0)" Then
Selection.Find(Format(ValMax(i), "#,##0_);[Red](#,##0)"), , xlValues, lookat:=xlWhole).Interior.Color = vbGreen[/COLOR]
Else: Selection.Find(Format(ValMax(i), Selection(1).NumberFormat), , xlValues, lookat:=xlWhole).Interior.Color = vbGreen
End If
ValMin(i) = Application.WorksheetFunction.Small(Selection, i)
If Selection(1).NumberFormat = "General" Then
Selection.Find(ValMin(i), , xlValues, lookat:=xlWhole).Interior.Color = vbRed
Else: Selection.Find(Format(ValMin(i), Selection(1).NumberFormat), , xlValues, lookat:=xlWhole).Interior.Color = vbRed
End If
Next i
Next n
End Sub