Bonjour,
Une proposition VBA.
Ne gère pas les exæquo...
Cdlt.
Private Sub Worksheet_Activate()
Dim pt As PivotTable
Dim rng As Range, rng2 As Range
Dim r As Long, r2 As Long
Set pt = Me.PivotTables(1)
With pt
.PivotCache.Refresh
With .TableRange1
.Interior.Color = xlNone
.Font.Bold = False
.Font.ThemeColor = xlThemeColorLight1
End With
End With
Set rng = pt.PivotFields("retard ").DataRange
r = pt.TableRange1.Row
r2 = Application.Match(Application.Min(rng), rng, 0)
Set rng2 = pt.TableRange1.Cells(r2 - 1 + r, 4).Offset(, -3).Resize(, 4)
With rng2.Cells
.Font.Bold = True
.Font.ThemeColor = xlThemeColorDark1
.Interior.Color = RGB(146, 208, 80)
End With
r2 = Application.Match(Application.Max(rng), rng, 0)
Set rng2 = pt.TableRange1.Cells(r2 - 1 + r, 4).Offset(, -3).Resize(, 4)
With rng2.Cells
.Font.Bold = True
.Font.ThemeColor = xlThemeColorDark1
.Interior.Color = RGB(255, 0, 0)
End With
End Sub