Stocker les résultats dans un tableau VBA
Bonjour !
j'ai un macro que je fais tourner mon plusieurs valeur de i !
Je souhaiterai pour chaque i aller stocker dans les résultats dans un tableau sur nouvelle feuille avec comme nom de colonne à chaque fois : Col_i
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Sub validation()
Dim v As Variant
Dim var1 As Variant
Dim var2 As Variant
Dim tableau As Range
With Worksheets("Parametre")
derniere_ligne = Range("A19").End(xlDown).Row
For i = 19 To derniere_ligne
If (Not IsEmpty(Range("A" & i))) Then
If (Range("B" & i) = ">") Then
var1 = .Cells(i, 1).Value
var2 = .Cells(i, 3).Value
v = Application.Run("BERT.Call", "compare_sup", var1, var2)
EndIf
If (Range("B" & i) = "<") Then
var1 = .Cells(i, 1).Value
var2 = .Cells(i, 3).Value
v = Application.Run("BERT.Call", "compare_inf", var1, var2)
End If
End If
Next i
End With
End Sub |
Pour stocker les résultats j'utilise normalement :
Code:
ActiveSheet.Range("A1:I130000").Value = v
, pouvez vous me dire comment remplacer ce code pour que ce soit dans la colonne B puis C de ma nouvelle feuille?
merci !