Bonjour,
j'utilise EXCEL2010 qui est sensé pouvoir utiliser 1048576 lignes.
mon fichier comporte environ 120000 lignes.
j'ai une macro "adaptée" qui traite des doublons mais bizarrement la macro "plante" à la ligne 65536 !
comment "forcer" excel à continuer ?
merci de l'aide
voici mon code où quand la variable ligT atteint la valeur 65536 j'ai une erreur d'exécution '13'
bonne journée
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 RegroupeLigneS() Worksheets("CONCESSION_COMPIL").Activate Set d1 = CreateObject("Scripting.Dictionary") Set shtoto = Sheets.Add(after:=Sheets(Sheets.Count)) shtoto.Name = "TEMPO" Set f1 = Sheets("CONCESSION_COMPIL") Set f2 = Sheets("TEMPO") ncol = f1.[a1].CurrentRegion.Columns.Count nlig = f1.[a1].CurrentRegion.Rows.Count d1.CompareMode = vbTextCompare For ligne = 1 To nlig crit = f1.Cells(ligne, 1) & f1.Cells(ligne, 3) ' critère doublon : colonne1 et colonne 3 d1(crit) = "" ligT = Application.Match(crit, d1.keys, 0) For col = 1 To ncol If f1.Cells(ligne, col) <> "" Then f2.Cells(ligT, col) = f1.Cells(ligne, col).Text Next col If f1.Cells(ligne, ncol) <> "" Then f1.Cells(ligne, ncol).Copy f2.Cells(ligT, ncol) Next ligne f1.Delete f2.Activate ActiveSheet.Name = "CONCESSION_COMPIL" Set shtoto = Nothing End Sub
Partager