Sub Suppr_ligne()
Dim ref As String
Sheets("Tableau Analyse").Select
If ActiveCell.Value = "OK" Then
DateLue = Range("E" & ActiveCell.Row).Value
ref = Range("B" & ActiveCell.Row).Value
Sheets("Données").Select
Set rngTrouve = ActiveSheet.Columns(1).Cells.Find(what:=ref)
If rngTrouve Is Nothing Then
MsgBox "Pas trouvé"
Else
rngTrouve.Activate
MsgBox rngTrouve.Address
If (DateLue = Range("E" & ActiveCell.Row).Value) Then
ActiveCell.EntireRow.Delete
ActiveSheet.PivotTables("Tableau croisé dynamique1").PivotCache.Refresh
Else
rngTrouve = ActiveSheet.Columns(1).Cells.FindNext().Activate
End If
End If
Set rngTrouve = Nothing
End If
End Sub