Bonjour,

Comme je ne suis fort en VBA je voulais que vous édiez j'un deux classeur je dois copier les commentaires de I20:N20 mais chaque 7 lignes ya commentaire de I:N ils sont fisionner et j'ai 1000 lignes, je dois correspondre pour chaque numero de client qui est la colonne A son commentaire.
Merci pour votre aide
voici le code que j'ai fait

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
31
Sub copier_commentaires()
Set xlbookbesoin = Application.ActiveWorkbook
     filetoopen = Application _
    .GetOpenFilename("Fichier Excel (*.xls), *.xls", , "Selectionner le tableau des Commentaire")
 
If filetoopen <> False Then
 
Set xlbook = Application.Workbooks.Open(filetoopen)
For x = 20 To 100 Step 7
 
Set xlbook = Application.Workbooks.Open(filetoopen)
 
  ActiveWorkbook.Sheets("Sommaire").Range("I" & x).Copy
  xlbookbesoin.Activate
  ActiveWorkbook.Sheets("Sommaire").Visible = True
  ActiveWorkbook.Sheets("Sommaire").Select
  ActiveSheet.Range("I20").Select
  Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
ActiveWorkbook.Save
 
xlbook.Close
    End If
  Application.DisplayAlerts = True
 
    ActiveSheet.DisplayAutomaticPageBreaks = False
 
    Application.ScreenUpdating = True
 
 
End Sub