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
| Sub Copier_plage_discontinue()
Dim Plage As Range, F1 As Worksheet, F2 As Worksheet
Set F1 = ThisWorkbook.Worksheets("Conférences")
Set F2 = ThisWorkbook.Worksheets("Calendrier")
' effacer la zone dans F2
DerLigne = F2.Cells(65536, 1).End(xlUp).row ' dans la colonne 1...
'DerCol = F2.Cells(1, 255).End(xlToLeft).Column
Set Plage = F2.Range(Cells(4, 3), Cells(DerLigne, 8))
Plage.ClearContents '( Rangée H est la dernière colonne)
With Plage.Interior
.ColorIndex = 2 ' tout en blanc
.Pattern = xlSolid ' pas de motif
.PatternColorIndex = xlAutomatic
End With
DerLigne = F1.Cells(65536, 1).End(xlUp).row ' dans la colonne 1...
Set Plage = Union(F1.Range(Cells(1, 6), Cells(DerLigne, 6)), F1.Range(Cells(1, 10), Cells(DerLigne, 12)))
Plage.Copy Destination:=F2.Range("C4") |
Partager