judoka0209
XLDnaute Occasionnel
bonjour ma macro ne va pas ouvrir mon fichier à l'adresse suivante
\\atlas.edf.fr\CO\45dam-dpn\restreint.007\ps.004\Pap_pcp\LISTES\Planning_EP.xlsm").Sheets("ep").Range("F7:BE7")
merci[/CODE]
\\atlas.edf.fr\CO\45dam-dpn\restreint.007\ps.004\Pap_pcp\LISTES\Planning_EP.xlsm").Sheets("ep").Range("F7:BE7")
VB:
Sub ep_33111()
'equipe A
Dim plage1 As Range, plage2 As Range, jour, c As Range, j As Variant
Set plage1 = Workbooks("\\atlas.edf.fr\CO\45dam-dpn\restreint.007\ps.004\Pap_pcp\LISTES\Planning_EP.xlsm").Sheets("ep").Range("F7:BE7")
Set plage2 = Workbooks("\\atlas.edf.fr\CO\45dam-dpn\restreint.007\ps.004\Pap_pcp\LISTES\Planning_EP").Sheets("ep").Range("F2:BE2") 'ligne 2 et non pas 5
jour = Array("jeu") 'liste à adapter
With Application
.ScreenUpdating = False
Range("C13:NC13").ClearContents
For Each c In Range("C13:NC13")
If UCase(c.Offset(-8)) = "A" Then 'M,A,N
If IsNumeric(.Match(c.Offset(-11), jour, 0)) Then
i = .Match(c.Offset(-10), plage2)
If IsNumeric(i) Then If UCase(plage1(i)) = "A" Then c = 6 'equipe
End If
End If
Next
End With
End Sub
Dernière édition: