1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Dim Cel As Range, Plage As Range, Verif As Boolean
With Sheets("Extraction")
Set Plage = .Range("R1:R" & .Range("R" & Rows.Count).End(xlUp).Row)
For Each Cel In Plage
If Application.WorksheetFunction.IsNA(Cel.Value) = True Then
MsgBox "Il y a des #N/A dans le tableau d'extraction. Complétez la table avant édition du TCD"
Plage.AutoFilter Field:=1, Criteria1:="#N/A"
Verif = True
Exit For
End If
Next
End With
If Verif = False Then
Sheets("Balance IG").Select
Range("E8").Select
ActiveSheet.PivotTables("Tableau croisé dynamique3").PivotCache.Refresh
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End If |