Matrice VBA
Résolu
memez
-
Fxbrg Messages postés 710 Date d'inscription Statut Membre Dernière intervention -
Fxbrg Messages postés 710 Date d'inscription Statut Membre Dernière intervention -
Salut le forum,
voila mon problème, je voudrai réaliser une boucle sous VBA mais il me dit que l'expression de ma matrice est incorrecte.
Sub extrapolation()
Dim n As Integer, p As Integer, i As Integer
Application.ScreenUpdating = False
poteau = 0
Do
poteau = poteau + 1
Range("P1:Z" & Worksheets("feuil1").Cells(7, 2).Value + 1).Clear
Range("AC1:AN" & Worksheets("feuil1").Cells(7, 2).Value * 2).Clear
Range("B & (3 * poteau + 4):M" & (3 * poteau + 5)).Copy
Range("AC" & (2 * poteau - 1)).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("AC & 2 * poteau - 1:Z" & 2 * p).Select
Selection.Sort Key1:=Range("AC & 2 * poteau - 1: AP" & 2 * poteau - 1), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Loop Until poteau = Worksheets("feuil1").Cells(7, 2).Value
End Sub
apparement, ce qui pose probleme c'est l'expression de ma matricee: Range("B & (3 * poteau + 4):M" & (3 * poteau + 5))
merci de me répondre
voila mon problème, je voudrai réaliser une boucle sous VBA mais il me dit que l'expression de ma matrice est incorrecte.
Sub extrapolation()
Dim n As Integer, p As Integer, i As Integer
Application.ScreenUpdating = False
poteau = 0
Do
poteau = poteau + 1
Range("P1:Z" & Worksheets("feuil1").Cells(7, 2).Value + 1).Clear
Range("AC1:AN" & Worksheets("feuil1").Cells(7, 2).Value * 2).Clear
Range("B & (3 * poteau + 4):M" & (3 * poteau + 5)).Copy
Range("AC" & (2 * poteau - 1)).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("AC & 2 * poteau - 1:Z" & 2 * p).Select
Selection.Sort Key1:=Range("AC & 2 * poteau - 1: AP" & 2 * poteau - 1), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Loop Until poteau = Worksheets("feuil1").Cells(7, 2).Value
End Sub
apparement, ce qui pose probleme c'est l'expression de ma matricee: Range("B & (3 * poteau + 4):M" & (3 * poteau + 5))
merci de me répondre
lol
merci