Salut TheSpeedy,
Salut Ric,
premier jet...
Concernant le message précédent concernant le Multi-Select des ListBox 1 et 2, dans cette version-ci, j'ai strictement interprété ta demande initiale qui stipulait implicitement que seuls les degrés étaient en mode Multi-Select.
J'y ai ajouté les jours, malgré tout.
Il y a encore des incohérences entre degrés et jours mais, à chaque nuit suffit sa peine : je regarderai demain, après un premier test et d'éventuelles précisions quant à tes attentes, pour soigner tout cela.
iRowPC1 = .Range("A:A").Find(what:=sNom, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlNext).Row
iRowPC2 = .Range("A:A").Find(what:=sNom, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlPrevious).Row
iRowPC1 = .Range("B" & iRowPC1 & ":" & "B" & iRowPC2).Find(what:=sCours, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlNext).Row
iRowPC2 = .Range("B2:B" & iRowPC2).Find(what:=sCours, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlPrevious).Row
'
For x = 0 To Me.ListBox3.ListCount - 1
If Me.chkLevel.Value = True And (Me.ListBox3.Selected(x) = True Or Me.chkAll_L.Value = True) Then
sLevel = Me.ListBox3.List(x, 0)
iRowL1 = .Range("C" & iRowPC1 & ":C" & iRowPC2).Find(what:=sLevel, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlNext).Row
iRowL2 = .Range("C" & iRowPC1 & ":C" & iRowPC2).Find(what:=sLevel, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlPrevious).Row
For y = 0 To Me.ListBox4.ListCount - 1
If Me.chkDays.Value = True And (Me.ListBox4.Selected(y) = True Or Me.chkAll_D.Value = True) Then
sDay = Me.ListBox4.List(y, 0)
iRowD1 = .Range("D" & iRowL1 & ":D" & iRowL2).Find(what:=sDay, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlNext).Row
iRowD2 = .Range("D" & iRowL1 & ":D" & iRowL2).Find(what:=sDay, lookat:=xlWhole, LookIn:=xlValues, searchdirection:=xlPrevious).Row
iRowT = sWk.Range("C" & Rows.Count).End(xlUp).Row + 1
For Z = iRowD1 To iRowD2
For k = 1 To 12
sWk.Cells(iRowT, k + 2) = .Cells(Z, Choose(k, 5, 3, 6, 7, 8, 9, 10, 11, 12, 13, 4, 2))
Next
Next
End If
Next
End If
Next
A+