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
| Private Sub CHierarchisation_Click()
With Sheets("PLANACTION")
.Range("A9:O65536").Delete
For Each Sh In Sheets
Select Case Sh.Name
Case "ADMINISTRATIF", "COLLECTEDECHETS", "DDD", "ESPACESVERTS", "GYPSE", "HAUTEPRESSION", "HOSPITALIER", "HÔTELLERIE", "INDUSTRIE", "INTERHAUTEUR", "LOGISTIQUE", "MECANISE", "NETTOYAGE", "SANITAIRES", "TUNNEL", "VITRERIE"
For lg = 9 To Sh.Range("A" & Rows.Count).End(xlUp).Row
LgS = .UsedRange.Rows.Count + 1
.Cells(LgS, 1) = Sh.Cells(lg, 18)
.Cells(LgS, 2) = Sh.Cells(lg, 6)
.Cells(LgS, 3) = Sh.Cells(lg, 5)
.Cells(LgS, 4) = Sh.Cells(lg, 11)
.Cells(LgS, 5) = Sh.Cells(lg, 12)
.Cells(LgS, 6) = Sh.Cells(lg, 14)
.Cells(LgS, 7) = Sh.Cells(lg, 17)
Next
Case Else
End Select
Next
.Range("A9:O65536").CurrentRegion.Sort key1:=Range("G9"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With
Sheets("PLANACTION").Activate
Unload FIDENTIFICATION
Unload FSECTORISATION
Unload FMAÎTRISE
Unload FPLANACTION
End Sub |