Bonjour,
Non, malheureusement, ce n'est pas très clair (même si j'ai ma petite idée). Il faudrait un fichier exemple avec les cas possibles.
En attendant, voici un premier tir à l'aveugle :
sub test()
with activesheet
dl = .cells(.rows.count, 1).end(xlup).row
with .range("A2:G" & dl)
t = .value2
redim tsolde(1 to ubound(t) * 2, 1 to ubound(t, 2))
for i = lbound(t) to ubound(t)
for k = lbound(t, 2) to ubound(t, 2)
tsolde(i, k) = t(i, k)
tsolde(i + 1, k) = t(i, k)
next k
tsolde(i + 1, 7) = - t(i, 7)
next i
.resize(ubound(tsolde)).value2 = tsolde
end with
end with
end sub
Cdlt,