Private Sub formulaTABeng()
Dim lr3 As Long
Dim TabEng As ListObject
Set wk = ThisWorkbook
Set wsS13 = wk.Worksheets("TabGraphEng")
Set TabEng = wsS13.ListObjects("Tableau1")
lr3 = TabEng.DataBodyRange.Rows.Count + 9
With wsS13.Range("D10:D" & lr3)
.FormulaR1C1 = _
"=IF(COUNTIFS(IF(ISNA(INDEX(SKR[Montant engagé],MATCH([@KRC]&[@[L KRC]],SKR[KRC]&SKR[L KRC],0))),0,INDEX(SKR[Montant engagé],MATCH([@KRC]&[@[L KRC]],SKR[KRC]&SKR[L KRC],0))),"">""&0,IF(ISNA(INDEX(SKR[Montant engagé],MATCH([@KRC]&[@[L KRC]],SKR[KRC]&SKR[L KRC],0))),0,INDEX(SKR[Montant engagé],MATCH([@KRC]&[@[L KRC]],SKR[KRC]&SKR[L KRC],0))),""<""&1)=1,1,IF(ISNA(INDEX(" & _
" SKR[Montant engagé],MATCH([@KRC]&[@[L KRC]],SKR[KRC]&SKR[L KRC],0))),0,INDEX(SKR[Montant engagé],MATCH([@KRC]&[@[L KRC]],SKR[KRC]&SKR[L KRC],0))))"
.FormulaArray = .FormulaR1C1
End With
wsS13.Range("D10:D" & lr3).Value = wsS13.Range("D10:D" & lr3).Value
End sub