Christian0258
XLDnaute Accro
Bonjour à tout le forum,
Je souhaiterais vos lumières concernant ce problème:
j'ai placé dans une feuille cette fonction, mais après un copier/coller ça ne colle les deux formules qu'en Y2 et Z2 (ligne 1 titre) et pas sur les autres cellules des lignes bien renseignées col K et L...Pourriez-vous me dire?...
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Me.[K:L], Target) Is Nothing Or Target.Row < 2 Then Exit Sub
Me.Cells(Target.Row, 25).FormulaR1C1 = "=SUMPRODUCT((OFFSET(PlatsQtés!R5C3:R711C3,,MATCH(RC1,PlatsQtés!R3C4:R3C12,0)-1)=RC11)*OFFSET(PlatsQtés!R5C4:R711C4,,MATCH(RC1,PlatsQtés!R3C4:R3C12,0)-1))"
'soit col y
If Intersect(Me.[K:L], Target) Is Nothing Or Target.Row < 2 Then Exit Sub
Me.Cells(Target.Row, 26).FormulaR1C1 = "=RC[-12]/RC[-14]*RC[-1]"
'soit col z
End Sub
Merci pour votre aide.
Bien amicalement,
Christian
Je souhaiterais vos lumières concernant ce problème:
j'ai placé dans une feuille cette fonction, mais après un copier/coller ça ne colle les deux formules qu'en Y2 et Z2 (ligne 1 titre) et pas sur les autres cellules des lignes bien renseignées col K et L...Pourriez-vous me dire?...
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Me.[K:L], Target) Is Nothing Or Target.Row < 2 Then Exit Sub
Me.Cells(Target.Row, 25).FormulaR1C1 = "=SUMPRODUCT((OFFSET(PlatsQtés!R5C3:R711C3,,MATCH(RC1,PlatsQtés!R3C4:R3C12,0)-1)=RC11)*OFFSET(PlatsQtés!R5C4:R711C4,,MATCH(RC1,PlatsQtés!R3C4:R3C12,0)-1))"
'soit col y
If Intersect(Me.[K:L], Target) Is Nothing Or Target.Row < 2 Then Exit Sub
Me.Cells(Target.Row, 26).FormulaR1C1 = "=RC[-12]/RC[-14]*RC[-1]"
'soit col z
End Sub
Merci pour votre aide.
Bien amicalement,
Christian
Dernière édition: