Private Sub Worksheet_Activate()
Dim n&
Application.ScreenUpdating = False
Range("A3:H" & Rows.Count).ClearContents 'RAZ
With Sheets("AnalytiqueFacilComptaDos")
n = Application.Count(.Range("I7:I" & .Rows.Count))
If n Then
Intersect(Union(.Range("B7:F" & .Rows.Count), .Range("H7:I" & .Rows.Count)), _
.Range("I7:I" & .Rows.Count).SpecialCells(xlCellTypeConstants, 1).EntireRow).Copy 'copier
[A3].PasteSpecial xlPasteValues 'collage spécial Valeurs
Application.CutCopyMode = 0
[H3].Resize(n) = "=IF(F3="""","""",G3/F3)" 'formule sur n lignes
End If
End With
[A1].Select
End Sub