Bonjour
j'ai une question toute bete , avec les deux tableaux suivants
x = array(1,2,3,4,5,6,7,8,9)
y = array(2,3,8)
est il possible de construire un nouveau tableau ne contenant que les elements de x privé de ceux de y ?
dans le genre z = array(1,4,5,6,7,9)
Merci pour vos réponses
j'ai pu ecrire ceci , mais peut etre il y a t il plus simple
x = Array(1, 2, 3, 4, 5, 6, 7, 8, 9)
y = Array(1, 4, 9)
For i = 0 To UBound(x)
For j = 0 To UBound(y)
If x(i) = y(j) Then
x(i) = ""
End If
Next
Next
For k = 0 To UBound(x)
If x(k) <> "" Then
z = z & " " & x(k)
End If
Next
v = Split(z, " ")
For i = 1 To UBound(v)
MsgBox v(i)
Next