macro lente est ce qu il y a un moyen de rendre ma feuille excel plus rapide

mikyross

XLDnaute Nouveau
bonjour a tous
je suis débutant dans excel et je me suis faite une feuille excel avec des recherche sur google j en suis venu a se que je voulais faire mais je trouve que mes macro ne calcule pas rapidement et j aimerais savoir si y aurais moyen d acceler le processus en modifiant quelque chose
merci de a l avance pour votre aide
 

Pièces jointes

  • feuille de calcule pour la spack v4,6 beta.xlsm
    47.6 KB · Affichages: 34
  • feuille de calcule pour la spack v4,6 beta.xlsm
    47.6 KB · Affichages: 39
  • feuille de calcule pour la spack v4,6 beta.xlsm
    47.6 KB · Affichages: 40

PMO2

XLDnaute Accro
Re : macro lente est ce qu il y a un moyen de rendre ma feuille excel plus rapide

Bonjour,

Peut être comme cela (voir les ajouts signalés par des ///)
Code:
Sub change1()
Application.EnableEvents = False   '///ajout


'Application.ScreenUpdating = False
ActiveSheet.Unprotect
Application.DisplayAlerts = False 'messages excel
Application.DisplayStatusBar = True ' info avancement macro dans barre d'infos en bas écran
Application.StatusBar = "Synthèse PEPS en cours"
Application.ScreenUpdating = False 'rafraichissement ecran (pour ne pas voir défiler les macros)
Application.Cursor = xlWait 'sablier
Application.Calculation = xlCalculationManual ' supprime calcul auto EXCEL pour gagner du temps.  A remettre dans fin_sub
 Rows("2:2").EntireRow.Hidden = False
If Range("b1").Value = "0" Then Rows("2:14").EntireRow.Hidden = True
If Range("b1").Value = "<0" Then Rows("2:2").EntireRow.Hidden = False
Rows("3:14").EntireRow.Hidden = False
If Range("b2").Value = "0" Then Rows("3:14").EntireRow.Hidden = True
If Range("b2").Value = "1" Then Rows("4:14").EntireRow.Hidden = True
If Range("b2").Value = "2" Then Rows("6:14").EntireRow.Hidden = True
If Range("b2").Value = "3" Then Rows("6:14").EntireRow.Hidden = True
If Range("b2").Value = "4" Then Rows("6:14").EntireRow.Hidden = True
Rows("6:14").EntireRow.Hidden = False
If Range("b3").Value = "0" Then Rows("6:14").EntireRow.Hidden = True
If Range("b3").Value = "700" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "701" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "702" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "704" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "4670" Then Rows("7:14").EntireRow.Hidden = True
If Range("b3").Value = "46100" Then Rows("7:14").EntireRow.Hidden = True
Rows("7:14").EntireRow.Hidden = False
If Range("b6").Value = "0" Then Rows("7:14").EntireRow.Hidden = True
If Range("b6").Value = "4" Then Rows("7:7").EntireRow.Hidden = True
If Range("b6").Value = "4" Then Rows("13:13").EntireRow.Hidden = True
If Range("b6").Value = "7" Then Rows("7:7").EntireRow.Hidden = True
If Range("b6").Value = "7" Then Rows("13:13").EntireRow.Hidden = True
If Range("b6").Value = "17" Then Rows("7:7").EntireRow.Hidden = True
If Range("b6").Value = "17" Then Rows("13:13").EntireRow.Hidden = True
Rows("12:14").EntireRow.Hidden = False
If Range("b11").Value = "0" Then Rows("12:14").EntireRow.Hidden = True
If Range("b11").Value = "1" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "2" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "3" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "4" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "5" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "6" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "7" Then Rows("13:13").EntireRow.Hidden = True
If Range("b11").Value = "8" Then Rows("13:13").EntireRow.Hidden = True
 If Range("B2").Value = 0 Then
Range("B5, C5, D5 , B11, B3, B6").Value = 0
End If
If Range("B2").Value = 1 Then
Range("C3, D3, E3, B5, C5, D5").Value = 0
Range("C3, D3, E3").Locked = True
End If
If Range("B2").Value = 2 Then
Range("D3, E3, D5, C5").Value = 0
Range("D3, E3, C5, D5").Locked = True
End If
If Range("B2").Value = 3 Then
Range("E3, D5").Value = 0
Range("E3, D5").Locked = True
End If
Application.DisplayAlerts = True
Application.StatusBar = "Synthèse OK"
Application.ScreenUpdating = True 'rafrfraichissement ecran
Application.Cursor = xlDefault 'sablier
Application.Calculation = xlCalculationAutomatic
ActiveSheet.Protect
'Application.ScreenUpdating = True

Application.EnableEvents = True      '///ajout
End Sub
 

ROGER2327

XLDnaute Barbatruc
Re : macro lente est ce qu il y a un moyen de rendre ma feuille excel plus rapide

Bonsoir.


Un essai. Tous les modules ont été modifiés.​


ℝOGER2327
#7829


Mercredi 11 Clinamen 142 (Saint Maquereau, intercesseur - fête Suprême Quarte)
13 Germinal An CCXXIII, 9,9373h - morille
2015-W14-4T23:50:58Z
 

Pièces jointes

  • feuille de calcule pour la spack v4,6 beta-1.xlsm
    44.7 KB · Affichages: 33
  • feuille de calcule pour la spack v4,6 beta-1.xlsm
    44.7 KB · Affichages: 45
  • feuille de calcule pour la spack v4,6 beta-1.xlsm
    44.7 KB · Affichages: 43

mikyross

XLDnaute Nouveau
Re : macro lente est ce qu il y a un moyen de rendre ma feuille excel plus rapide

Bonjour
J ai copier les ligne de pm02 et modifier mes formule avec l aide de la version que roger2327 a faite et maintenant ma feuille de calcule est rapide Merci a pm02 et roger2327
 

Discussions similaires

Statistiques des forums

Discussions
312 370
Messages
2 087 686
Membres
103 638
dernier inscrit
Pascal29