Salut,
avec l'ajout de la fonction "sierreur" que je t'invite à étudier
ce qui donne en formule
=SIERREUR(INDEX($A$3:$O$3;;EQUIV(INDIRECT("c"&LIGNE());presta;0));"")
et en macro une nouvelle fois modifiée
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, ([choixtarif])) Is Nothing Then
If Right(ActiveCell.Value, 1) = "%" Then
ActiveCell.Offset(0, -1).Value = ActiveCell.Offset(0, -1).Value * 0.9
End If
If Not Right(ActiveCell.Value, 1) = "%" Then
ActiveCell.Offset(0, -1).FormulaLocal = "=SIERREUR(INDEX($A$3:$O$3;;EQUIV(INDIRECT(""c""&LIGNE());presta;0));"""")"
End If
End If
If Not Intersect(Target, ([choixpresta])) Is Nothing Then
ActiveCell.Offset(0, 1).FormulaLocal = "=SIERREUR(INDEX($A$3:$O$3;;EQUIV(INDIRECT(""c""&LIGNE());presta;0));"""")"
ActiveCell.Offset(0, 2).Value = ""
ActiveCell.Offset(0, -1).Value = ""
End If
End Sub