smahancharif
XLDnaute Junior
bonjour je suis nouvelle ici et je souhaiterai créer un planning où les 47 employés pourrait intégrer leurs horaires il y 4 types d'horaires et 3 tupes de pauses.
merci
merci
@Etoto n'hésite pas si tu sais...
Il a encodé son horaire mais dans la feuille planning ce n'est pas ce qu'il a encodé???Heuuu, le problème est que ta barre de tache est plus du tout au bon endroit ? Explique moi le démarche du collaborateur et je vais essayer de reproduire cette erreur.
Il a encodé son horaire mais dans la feuille planning ce n'est pas ce qu'il a encodé???
Sub planning()
Dim f1 As Worksheet, f2 As Worksheet
Dim lig2 As Integer, lig1 As Integer, x As Integer, y As Integer
Set f1 = Sheets("Base")
Set f2 = Sheets("Planning")
Application.ScreenUpdating = False
With f2
.Unprotect
lig2 = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range("B4:V" & lig2).ClearContents
lig1 = f1.Cells(f1.Rows.Count, 1).End(xlUp).Row
lig2 = .Cells(.Rows.Count, 1).End(xlUp).Row
For x = 3 To lig1
For y = 4 To lig2
If f1.Cells(x, 3) = .Cells(1, 7) Then
If f1.Cells(x, 2) = .Cells(y, 1) Then
.Cells(y, 2) = f1.Cells(x, 4).Text & " " & f1.Cells(x, 7).Text
.Cells(y, 3) = f1.Cells(x, 5).Text & " " & f1.Cells(x, 6).Text
.Cells(y, 4) = f1.Cells(x, 8).Text
.Cells(y, 6) = f1.Cells(x, 10).Text & " " & f1.Cells(x, 13).Text
.Cells(y, 7) = f1.Cells(x, 11).Text & " " & f1.Cells(x, 12).Text
.Cells(y, 8) = f1.Cells(x, 14).Text
.Cells(y, 10) = f1.Cells(x, 16).Text & " " & f1.Cells(x, 19).Text
.Cells(y, 11) = f1.Cells(x, 17).Text & " " & f1.Cells(x, 18).Text
.Cells(y, 12) = f1.Cells(x, 20).Text
.Cells(y, 14) = f1.Cells(x, 22).Text & " " & f1.Cells(x, 25).Text
.Cells(y, 15) = f1.Cells(x, 23).Text & " " & f1.Cells(x, 24).Text
.Cells(y, 16) = f1.Cells(x, 26).Text
.Cells(y, 18) = f1.Cells(x, 28).Text & " " & f1.Cells(x, 31).Text
.Cells(y, 19) = f1.Cells(x, 29).Text & " " & f1.Cells(x, 30).Text
.Cells(y, 20) = f1.Cells(x, 32).Text
.Cells(y, 22) = f1.Cells(x, 34).Text
End If
End If
Next y
Next x
.protect
End With
Application.ScreenUpdating = True
End Sub