ok voila le code problématique.
je présise qu'il fonctionne très bien depuis un appel fait de la feuille 4
Sub Voir_Stat()
'************ sup ligne ********************
For lin = Worksheets('CALCUL').UsedRange.Rows.Count + Worksheets('CALCUL').UsedRange.Row To 6 Step -1
'MsgBox lin
If Cells(lin, 1) = '' Then Rows(lin).Delete Shift:=xlUp
Application.ScreenUpdating = False
Next lin
'*******************************************
'**********duplique la mise en forme et formule de la derniere ligne************
'*********** compte NB ligne chrono **************
For Compte = Worksheets('CHRONO').UsedRange.Rows.Count + Worksheets('CHRONO').UsedRange.Row To 7 Step -1
'*************************************************
test2 = Worksheets('CALCUL').UsedRange.Rows.Count
Cells(test2, 2).Select
'MsgBox Compte
ActiveCell.Range('A2').EntireRow.Insert
Range(Cells(test2, 1), Cells(test2, 6)).Copy _
Range(Cells(test2 + 1, 1), Cells(test2 + 1, 6)) 'copie les cellules A à F
Application.ScreenUpdating = False
Next Compte
test3 = test2 + 1
'************** écrase les formules *************
Worksheets('CALCUL').Range('A6:F' & test3).Value = Worksheets('CALCUL').Range('A6:F' & test3).Value
'***********
Cells.Range('A6:F' & test3).Select
'****************** vire les cellules vides *****************
For toto = Worksheets('CALCUL').UsedRange.Rows.Count + Worksheets('CALCUL').UsedRange.Row To 6 Step -1
If Cells(toto, 2) = '' Then Cells(toto, 2).Delete Shift:=xlUp
If Cells(toto, 3) = '' Then Cells(toto, 3).Delete Shift:=xlUp
If Cells(toto, 4) = '' Then Cells(toto, 4).Delete Shift:=xlUp
If Cells(toto, 5) = '' Then Cells(toto, 5).Delete Shift:=xlUp
If Cells(toto, 6) = '' Then Cells(toto, 6).Delete Shift:=xlUp
Application.ScreenUpdating = False
Next toto
Cells(test2, 2).Select
'******************* cacule les moyennes ************
'MsgBox test3
Range('B2').Value = Application.WorksheetFunction.Average(Range('B6:B' & test3))
Range('C2').Value = Application.WorksheetFunction.Average(Range('C6:C' & test3))
Range('D2').Value = Application.WorksheetFunction.Average(Range('D6
' & test3))
Range('E2').Value = Application.WorksheetFunction.Average(Range('E6:E' & test3))
Range('F2').Value = Application.WorksheetFunction.Average(Range('F6:F' & test3))
End Sub