1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| Sub mef_1()
Sheets("exp").Columns("a:a").ClearContents
témoin = True
With Sheets("base_cat")
.Activate
li = .[a60000].End(xlUp).Row
yy = 1
For i = 3 To li
F_BarreAttente.Show
For j = 1 To 78
xx = ""
If j = 10 Or j = 9 Or j = 8 Or j = 7 _
Or j = 6 Or j = 5 Or j = 4 Or j = 12 Then
n = .Cells(1, j)
m = Len(.Cells(i, j))
If m > n Then .Cells(i, j) = Left(.Cells(i, j), n)
m = Len(.Cells(i, j))
d = n - m
xx = .Cells(i, j)
If d <> 0 Then
Do While d <> 0
xx = xx & " "
d = d - 1
If d = 0 Then Exit Do
Loop
End If
xx = "'" & xx & "'" & ","
Else
If j = 78 Then
xx = .Cells(i, j)
Else
xx = .Cells(i, j) & ","
End If
End If
Sheets("exp").Cells(i - 2, 1) = Sheets("exp").Cells(i - 2, 1) & xx
Next j
p = p + 1 / li
F_BarreAttente.Label1.Width = p * 100
F_BarreAttente.Caption = Format(p, "0.0000%")
DoEvents
Next i
End With
témoin = False
Unload F_BarreAttente
End Sub |
Partager