' Blocage des recalculs With Application .Calculation = xlManual .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False ' Demande de recalcul (1 fois) Calculate ' Remise en calcul auto With Application .Calculation = xlAutomatic .MaxChange = 0.001 End WithTout dépend aussi de quand et combien de fois tu déclenches ta Macro3.
Sub Macro1() ' ' Macro1 Macro ' ' End Sub
' mise en page Range("A3:F3,H3:J3,L3:O3,Q3:BF3").Select Selection.Style = "40 % - Accent1" Range("A4:F4,H4:J4,L4:O4,Q4:BF4").Select Selection.Style = "20 % - Accent1" Range("Q3:Q4,X3:X4,AE3:AE4,AL3:AL4,AS3:AS4,AZ3:AZ4").Select Selection.Font.Bold = True Range("L3:L4,N3:N4").Select With Selection.Font .Color = -11489280 .TintAndShade = 0 End With Range("M3:M4,O3:O4").Select With Selection.Font .ThemeColor = xlThemeColorLight2 .TintAndShade = -0.249977111117893 End With Range("I3:I4").Select With Selection.Font .Color = -16776961 .TintAndShade = 0 End With Range("A3:BF4").Select Selection.Copy Range("A5:BF302").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False
Range("B1:B12").Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:= xlCellValue, Operator:=xlNotEqual, Formula1:="=""X""" Selection.FormatConditions(1).Interior.ColorIndex = 38
Public Sub ColoriseColonneSi() If Range("B3").Value = "" Then Range("$A$3:$F$302;$H$3:$J$302;$L$3:$O$302;$Q$3:$BF$302").Select With Selection.Interior .ColorIndex = xlNone End With With Selection.Font .FontStyle = "Normal" End Select ElseIf Range("K3").Value = "X" Then Range("$A$3:$F$302;$H$3:$J$302;$L$3:$O$302;$Q$3:$BF$302").Select With Selection.Interior .ColorIndex = 38 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With With Selection.Font .FontStyle = "Gras" End Select End If End SubNB : Bizarre que ta MFC porte sur le même groupe de cellules alors que tu ne testes pas la même cellule (B3 et K3)
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address "B3" Or Target.Address "K3" Then Call ColoriseColonneSi End If End SubPS : Cette Sub appartient à ta feuille
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question