Sub DerniereValo_IFLC1()
Worksheets("d").Activate
' renseigne les valo
Worksheets("perf").Activate
For i = 0 To 1000
If Range("B1").Offset(i, 0).Value <> 0 Then
'check liste d
For k = 1 To 500
If Range("B1").Offset(i, 0).Value = Range("iflc_ctt").Offset(k, 0).Value Then
Range("B1").Offset(i, 2).Value = Range("iflc_valo").Offset(k, 0).Value
End If
Next k
End If
Next i
' renseigne les valo
Worksheets("perf").Activate
For l = 0 To 1000
If Range("B1").Offset(i, 0).Value <> 0 Then
'check liste d
For m = 1 To 500
If Range("B1").Offset(l, 0).Value = Range("admin_contrat").Offset(m, 0).Value Then
Range("B1").Offset(l, 2).Value = Range("admin_valo").Offset(m, 0).Value
End If
Next m
End If
Next l
' renseigne les valo
Worksheets("perf").Activate
For n = 0 To 1000
If Range("B1").Offset(i, 0).Value <> 0 Then
'check liste d
For o = 1 To 500
If Range("B1").Offset(n, 0).Value = Range("iflc4_contrat").Offset(o, 0).Value Then
Range("B1").Offset(n, 2).Value = Range("iflc4_valo").Offset(o, 0).Value
End If
Next o
End If
Next n
Range("O1").Offset(0, 0).Value = "D:" & Date
Sheets("suivi détaillé d").PivotTables(1).RefreshTable
End Sub
Sub test()
Dim DerLig As Long
With Sheets("suivi détaillé d")
DerLig = .Range("H" & Rows.Count).End(xlUp).Row
With .Range("H3:H" & DerLig)
With .Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5296274
.TintAndShade = 0
.PatternTintAndShade = 0
End With
.Style = "Currency"
.NumberFormat = "_-* #,##0 $_-;-* #,##0 $_-;_-* ""-""?? $_-;_-@_-"
End With
End With
End Sub