Sub filldata()
Dim lrow As Long
lrow = Cells(Cells.Rows.Count, "I").End(xlUp).Row
Dim rng As Range, cell As Range
Set rng = Range("I1:I" & lrow)
For Each cell In rng
cell.NumberFormat = "@"
If cell.Value <> "" And Len(cell.Value) < 12 Then cell.Value = Application.WorksheetFunction.Rept("0", 12 - Len(cell.Value)) & cell.value
Next cell
End Sub
|