DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Change(ByVal Target As Range)
u = Len(Target.Text)
Target = Target & WorksheetFunction.Rept(0, 11 - u)
End Sub
İlgili sayfanın kod kısmına ekleyin. Bu işlem Excel içindeki her hücre için çalışmakta, belli sütunlar için çalıştırmak için kod içine ekleme yapmak gerekir.
Kod:Private Sub Worksheet_Change(ByVal Target As Range) u = Len(Target.Text) Target = Target & WorksheetFunction.Rept(0, 11 - u) End Sub
Sub Emre()
uz = 11
For i = 2 To Range("F65536").End(3).Row
If Len(Cells(i, "F")) < 11 Then
ekle = uz - Len(Cells(i, "F"))
a = [B][COLOR="Red"]String[/COLOR][/B](ekle, "0")
Cells(i, "F") = Cells(i, "F") & a
End If
Next i
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
If Target <> "" Then
u = Len(Target.Text)
Target = Target.Text & WorksheetFunction.Rept(0, 11 - u)
End If
End Sub
B kolonunun hücre formatını Genel olarak değiştirin. Aşağıdaki koduda eskisi ile değiştirin.
Kod:Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column <> 2 Then Exit Sub If Target <> "" Then u = Len(Target.Text) Target = Target.Text & WorksheetFunction.Rept(0, 11 - u) End If End Sub
Dosyanızın küçük bir örneğini ekleyin, öyle bakalım.