Salut les gars,
trouvé une erreur dans la macro 'BilanCHGT()'
[DATA_BILAN_CHGT].Cells = ""
tAgt = Range("A" & iNb1 & ":A" & (iNbEnd + 1) + (iNbWk * 2)).Value
tTab = Range(sColA & iNb1 & ":" & sColB & (iNbEnd + 1) + (iNbWk * 2)).Value
tData = [BILAN_CHGT].Cells.Value
'
For x = 1 To UBound(tTab, 1) Step iNb
For y = x + 2 To (x + 1) + (iNbWk * 2) Step 2
iRow = iRow + 1 'ligne d'affichage dans tData
If tAgt(y, 1) <> 0 Then
For Z = 1 To UBound(tData, 2)
tData(iRow, Z) = 0
For w = 1 To UBound(tTab, 2)
If tTab(y, w) = tData(1, Z) Then tData(iRow, Z) = CInt(tData(iRow, Z)) + 1
Next
If CInt(tData(iRow, Z)) = 0 Then tData(iRow, Z) = ""
Next
End If
Next
Next
[BILAN_CHGT].Cells = tData
Brice, pour t'aider dans ta recherche d'équité pour les remplacements, ceci (premier jet) te conviendrait-il ?
C'est un tableau qui reprend les candidats-remplaçants (idem que la liste de validation) avec leur quota de remplacements pendant la période de bilan programmée.
Peut-être pas besoin de ceux qui sont à zéro... ?
A+