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 46
| Sub alim_table()
y = 2
x = 7
Do Until y = 40
x = 7
Do Until x = 58
If Cells(x, y) = "x" Then
Workbooks.Open Filename:=Range("c63") & "\DT" & "_" & Cells(x, 1) & "_" & Cells(5, y) & ".xls"
Sheets("Temps").Select
l = Cells(7, 21).Value
x = 10
Do Until x = 30
Sheets("Temps").Select
If Cells(x, 21).Value <> "vide" Then
Sheets("Temps").Select
c = Cells(x, 21).Value + 3
t = Cells(x, 18).Value
ThisWorkbook.Activate
Sheets("base").Select
Cells(l + 3, c).Select
ActiveCell.Value = t
x = x + 1
Else
x = x + 1
End If
Loop
ActiveWorkbook.Close
Cells(x, y + 1) = "x"
Else
End If
x = x + 1
Loop
y = y + 2
Loop
End Sub |
Partager