Hi,
I try change code numbers like the follow one
0101010100
in this
01-01-01-01-00
and I know that with this formula
=(CONCATENATE(LEFT(A2;2);"-";MID(A2;3;2);"-";MID(A2;5;2);"-";MID(A2;7;2);"-";RIGHT(A2;2)))
I can work it out.
So I create the following code
Dim R As Long
R = 2
Do Until Trim(Cells(R, 1)) = ""
If Len(Cells(R, 1)) = 10 Then
Cells(R, 1).Offset(0, 2).Formula = "=(CONCATENATE(LEFT(A" & R & ";2);""-"";MID(A" & R & ";3;2);""-"";MID(A" & R & ";5;2);""-"";MID(A" & R & ";7;2);""-"";RIGHT(A" & R & ";2)))"
ElseIf Len(Cells(R, 1)) = 8 Then
Cells(R, 1).Offset(0, 2).Formula = "=(CONCATENATE(LEFT(A" & R & ";2);""-"";MID(A" & R & ";3;2);""-"";MID(A" & R & ";5;2);""-"";RIGHT(A" & R & ";2)))"
Else
Cells(R, 1).Offset(0, 2).Value = "TTTTTT"
End If
R = R + 1
Loop
but doenst work.
Can somebody help me.
Thanks in advance
Bookmarks