Re
Autre formule (qui marche avec l'exemple tel quel)
Sub ParCommoditéOnPeutEnvisagerUneMacro()
Dim t, u
t = Array(Array(1, 9), Array(2, 1)): u = Array(Array(1, 1), Array(2, 1)): Application.DisplayAlerts = 0
With Selection
.TextToColumns _
Destination:=.Offset(, 1).Item(1), DataType:=1, Other:=-1, OtherChar:=")", FieldInfo:=t
.Offset(, 1).TextToColumns _
Destination:=.Offset(, 1).Item(1), DataType:=1, Other:=-1, OtherChar:="-", FieldInfo:=u
End With
End Sub
=--STXT($B6;TROUVE("-";$B6)-5+3*COLONNES($C6:C6);2)
Je ne disais par autre choseBonjour gourdin, JM,
Sur un problème aussi simple VBA n'est vraiment pas nécessaire.
Tout comme on peut se passer de cette macro, en faisant manuellement le Données/Convertir