Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
With [A7].CurrentRegion
.Columns(1).Name = "DP"
.Columns(2).Name = "Type"
.Columns(3).Name = "NOM"
End With
With [G4:J6]
.Cells(1).FormulaArray = "=COUNT(MATCH({""A"",""B"",""C"",""D""},REPT(NOM,DP&Type=$F4&G$3),0))"
.Cells(1).AutoFill .Rows(1)
.Rows(1).AutoFill .Rows
.Value = .Value
End With
Application.EnableEvents = True
End Sub