Bonjour i20100,
Bravo c'est exactement ça ! Merci
Je ne comprends pas tout mais c'est super.
Mais si les additions ne sont pas "simples" mais en fait le résultat de fonctions comme Somme.si ou Somme.si.ens (comme dans ce 2è fichier), la macro peut-elle être adaptée ?
( je ne complique pas pour le fun, c'est en fait mon besoin réel )
Merci à toi
MichaelH
Bonjour,
à tester,
Sub test()
For Each c In Range("F4:F7")
txt = c.Formula
txt = Right(txt, Len(txt) - 1)
t = Split(txt, "+")
For i = LBound(t) To UBound(t)
If t(i) <> "" Then
n = Cells(Rows.Count, "K").End(xlUp).Row + 1
Range("L" & n) = Range(t(i)).Value
lig = Application.Match(Range(t(i)).Value, Range("D:D"), 0)
Range("J" & n) = Application.Index(Range("B:B"), lig)
Range("K" & n) = Application.Index(Range("C:C"), lig)
End If
Next i
Range("M" & n) = c
Next c
End Sub