bon j'ai trouvé ...
le pb venais pas de la formule...mais de la position de ces 2 lignes :
ActiveSheet.ChartObjects('Graphique 2').Activate
ActiveChart.ChartArea.Select
placées avec une boucle FOR .
donc ce code ne marche pas :
-----------------------------------------------------------------------
Dim I, Y, MaxX, NbImage, Couleur, MinX As Variant
NbImage = 35
Y = -259
MaxX = Range('I35')
MinX = Range('I36')
Couleur = Range('F33')
'''''''''trace et formatage graph
ActiveSheet.ChartObjects('Graphique 2').Activate
ActiveChart.ChartArea.Select
For I = 1 To NbImage
ActiveChart.SeriesCollection(I).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 2
.Shadow = False
End With
Next I
For I = 0 To 35 'nbImage - 1
Y = Y + 258
Cells(1, 1).Select
Range(Cells(NbImage + 6 + Y, 1 + Couleur), Cells(NbImage + 6 + Y + 256, 1 + Couleur)).Copy
Cells(40, 6 + I).Select
ActiveSheet.Paste
end sub
----------------------------------------------------------
celui là fonctionne
--------------------------------------------------------
Dim I, Y, MaxX, NbImage, Couleur, MinX As Variant
NbImage = 35
Y = -259
MaxX = Range('I35')
MinX = Range('I36')
Couleur = Range('F33')
'''''''''trace et formatage graph
ActiveSheet.ChartObjects('Graphique 2').Activate
ActiveChart.ChartArea.Select
For I = 1 To NbImage
ActiveChart.SeriesCollection(I).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 2
.Shadow = False
End With
Next I
'''''''''''''''''''''''''''''''''''''''
For I = 0 To 35 'nbImage - 1
Y = Y + 258
Cells(1, 1).Select
Range(Cells(NbImage + 6 + Y, 1 + Couleur), Cells(NbImage + 6 + Y + 256, 1 + Couleur)).Copy
Cells(40, 6 + I).Select
ActiveSheet.Paste
end sub
------------------------------------------------------------------------
bizard je vois pas pourquoi ..enfin il n'y a pas de raison