Bonjour, dans mon sub, je voudrais que l'addition suivante sache qu'elle traite des cellules Hexadecimal:
Cells(i, 2).Value = Cells(i - 1, 2).Value + x . Quel serait la syntaxe? J'aimerais egalement que le resultat comporte toujours 4 chiffres.
Sub ADRESSES2()
Dim lg As Long, i&, a&, x&, mem&
lg = Range("I" & Rows.Count).End(xlUp).Row
Columns(2).NumberFormat = "0000"
For i = 2 To lg
If Cells(i, 9) Like ".ORG*" Then Cells(i, 2) = Mid(Cells(i, 9), 6, 4): GoTo 1
For a = 3 To 6
If Cells(i - 1, a) <> "" Then x = x + 1
Next a
Cells(i, 2).Value = Cells(i - 1, 2).Value + x
1 Cells(i, 2) = "'" & Cells(i, 2).Text
x = 0
Next i
Cells(2, 2) = ""
End Sub