teodormircea
XLDnaute Occasionnel
Bonjour le forum,
J'ai transpose cette formule:LEFT(RC[-1],(LEN(RC[-1])-2))
en vba, ça marche très bien, mais ça bogue si j'ai des cellules pas remplie
Voila le Code:
J'ai transpose cette formule:LEFT(RC[-1],(LEN(RC[-1])-2))
en vba, ça marche très bien, mais ça bogue si j'ai des cellules pas remplie
Voila le Code:
Code:
Private Sub CommandButton5_Click()
Dim a As String
Dim ci As Integer
Dim lr&, col1&, col2&, i&, j&
ci = TextBox8
col1 = TextBox6: col2 = TextBox7
lr = ActiveSheet.Cells(Rows.Count, col1).End(xlUp).Row
For i = 2 To lr
ActiveSheet.Cells(i, col2).Value = Left(ActiveSheet.Cells(i, col1), Len(ActiveSheet.Cells(i, col1)) - ci)
Next i
End Sub