Macro synthese

MISTERJUNGLE

XLDnaute Occasionnel
Bonjour le forum

mon problème est le suivant:
dans la feuille "planning" j'ai couper les astreintes en 2 groupes et lors de la synthèse ( deuxième feuille)je m'aperçois que la macro prend en compte les
lignes 17,18,19,20
QUELLE LIGNE DE COMMANDE POUR PASSER DE LA LIGNE 16 "FRANÇOIS"
A LA LIGNE 21 "PAUL"
Beaucoup de tentatives mais toujours des erreurs!!!!
MERCI POUR VOTRE AIDE
ci joint la macro (BOISGONTIER)

Sub URGENTISTES()
Set p = Sheets("planning")
Set s = Sheets("synthast")
nbCol = 90
s.[A3:E1000].ClearContents
For ligne = 5 To 16
i = 2
Do While i < nbCol
témoin = False
Do While p.Cells(ligne, i) = "" And i < nbCol
i = i + 1: If i = nbCol Then témoin = True
Loop
If Not témoin Then
typeCongés = p.Cells(ligne, i)
début = p.Cells(4, i)
Do While p.Cells(ligne, i) = typeCongés And i < nbCol
i = i + 1: If i = nbCol Then témoin = True
Loop
If Not témoin Then
fin = p.Cells(4, i - 1)
ligneBD = s.[A65000].End(xlUp).Row + 1
s.Cells(ligneBD, 1) = p.Cells(ligne, 1)
s.Cells(ligneBD, 2) = début
s.Cells(ligneBD, 3) = fin
s.Cells(ligneBD, 4) = typeCongés
s.Cells(ligneBD, 5) = fin - début + 1
End If
End If
Loop
Next ligne
End Sub
 

Pièces jointes

  • synthese BIS date.zip
    11.5 KB · Affichages: 24
  • synthese BIS date.zip
    11.5 KB · Affichages: 24
  • synthese BIS date.zip
    11.5 KB · Affichages: 23

Statistiques des forums

Discussions
312 499
Messages
2 088 999
Membres
104 001
dernier inscrit
dessinbecm