bonsoir tout le monde
J'ai un souci avec ce code
Sub test()
Dim DerLColA As Long, DerLColB As Long, Mavariable As String, Result, Result1
DerLColA = Cells(Rows.Count, 6).End(xlUp).Row ' dernière ligne de la colonne f
DerLColB = Cells(Rows.Count, 7).End(xlUp).Row ' dernière ligne de la colonne g
Mavariable = Left(Range("A1").Value , 3)' 'recherche
Result = Application.SumIf(Left(Range("F1:F" & DerLColA), 3), Mavariable, Range("G1:G" & DerLColB)) 'Ta formule
'Range("B1") = Result
End Sub
merci de bien vouloir m'aider.