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 47 48 49 50 51 52 53 54 55 56
| Sub importer_mensuel()
Application.ScreenUpdating = False
Dim numero_jour As Byte
Dim ligne As Byte
ligne = 13
numero_jour = 1
colonne_A = 1
colonne_C = 3
colonne_H = 8
While numero_jour < 26
Sheets(numero_jour).Select
If (Range("I2") > "0") Then
Range("I2").Select
Selection.Copy
Sheets("total_mensuel").Select
Range(Cells(ligne, colonne_C), Cells(ligne, colonne_C)).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets(numero_jour).Select
Range("I1").Select
Selection.Copy
Sheets("total_mensuel").Select
Range(Cells(ligne, colonne_A), Cells(ligne, colonne_A)).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets(numero_jour).Select
Range("J43").Select
Selection.Copy
Sheets("total_mensuel").Select
Range(Cells(ligne, colonne_H), Cells(ligne, colonne_H)).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
numero_jour = numero_jour + 1
ligne = ligne + 1
Else
numero_jour = numero_jour + 1
End If
Wend
End Sub |
Partager