Bonjour à tous,
Je souhaiterais définir un Range de 70 cases horizontalement. Le numéro de ligne correspond au numéro de la ligne de la cellule venant de vérifier une condition.
Pourquoi est-ce que ce code ne fonctionne-t-il pas ?
Si en plus de la solution vous auriez une petite explication, je suis preneur !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 Dim BorneDroite As Integer, BorneBas As Integer Dim i As Integer, j As Integer, k As Integer, l As Integer, m As Integer, n As Integer Dim Plage1 As Range, Plage2 As Range, Plage3 As Range Dim Nom As String Dim Poste As String Dim Tbl As ListObject Dim Cell1 As Range, Cell2 As Range, Cell3 As Range, Cell4 As Range, Cell5 As Range Set Tbl = Sheets("ExtractionsPoste").ListObjects("TableauDonneesTriPoste") Set Plage1 = ThisWorkbook.Sheets("Données Provisoires Poste").Range("A7:A100") For Each Cell1 In Plage1 For Each Cell2 In Tbl.ListColumns("Noms").DataBodyRange If Cell2.Text = Cell1.Text Then Nom = Cell2.Text Debug.Print "Nom" & Nom '################## Ligne problématique ############## Plage2 = ThisWorkbook.Sheets("Données Provisoires Poste").Range(Cell1.Row & 2:Cell1.Row & 70) '############################################## End If Next Cell2 Next Cell1
Merci d'avance pour le coup de main !
Partager