Bonjour a tous,
Je suis semi-débutant en vba et j'ai réalisé une grosse macro pour le taf mais le probleme c'est que l'ouverture et l'enregistrement du fichier excel est super long.
Je voulais savoir si il existait un moyen de raccourcir cette durée ?
Je pense que c'est a cause de la longueur du code et du nombre de feuille créer (6) mais en fait je n'en sais rien, alors je sollicite tous les experts en vba
Voici le code : (dsl c'est assez lourd mais je vois pas comment faire)
'Récuperation des données
If MsgBox("Avez-vous supprimer la feuille BASE DQIE avant d'executer la macro", vbYesNo) _
= vbYes Then
'ouvrir fichier Source
Workbooks.Open Filename:="Y:\controle financier\Directions de production\Industrie\Gestion DQIE\EXIGIBLE\Exigible DQIE1.xls"
Windows("Exigible DQIE1.xls").Activate
Sheets("Date").Select
Range("C11").Select
ActiveCell.FormulaR1C1 = InputBox("Veuillez entrer la date de fin, de la dernière période de prévision d'encaissement sous forme MM/JJ/AAAA")
Range("C12").Select
Sheets("Base DQIE").Select
Sheets("Base DQIE").Copy Before:=Workbooks("Prev Encaissement.xlsm").Sheets(1)
Sheets("critère").Select
'supréssion des ligne
Rows("10:10").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
'filtre élaboré
Range("A10").Select
Sheets("Base DQIE").Columns("A:M").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("critère!Criteria"), CopyToRange:=Range("A10"), _
Unique:=True
'modif
Sheets("base").Select
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
'fin
Sheets("critère").Select
Rows("10:10").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("base").Select
Range("A1").Select
ActiveSheet.Paste
'Récupération des données pour mois M+1 M+2 M+3
Sheets("base").Select
Range("N1").Select
Selection.Style = "Normal 2"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 15
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.NumberFormat = "#,##0.00"
ActiveCell.FormulaR1C1 = "Mois"
With ActiveCell.Characters(Start:=1, Length:=4).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Range("N2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]="""","""",MONTH(RC[-7]))"
Range("N2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveSheet.Paste
Range("N2").Select
Application.CutCopyMode = False
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=-21
Range("N3").Select
'mois M+1
Sheets("mois+1").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A11").Select
Range("A8").Select
Sheets("base").Columns("A:N").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("'mois+1'!Criteria"), CopyToRange:=Range("A10:N10"), _
Unique:=True
'Mois M+2
Sheets("mois+2").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A14").Select
Sheets("base").Columns("A:N").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("'mois+2'!Criteria"), CopyToRange:=Range( _
"'mois+2'!Extract"), Unique:=True
'Mois M+3
Sheets("mois+3").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A15").Select
Sheets("base").Columns("A:N").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("'mois+3'!Criteria"), CopyToRange:=Range( _
"'mois+3'!Extract"), Unique:=True
'Mois M + Exigible
Sheets("base").Select
Range("O1").Select
Selection.Style = "Normal 2"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 15
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.NumberFormat = "#,##0.00"
ActiveCell.FormulaR1C1 = "Exigible"
With ActiveCell.Characters(Start:=1, Length:=8).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
'Formule dans la base pour l'exigible
Range("O2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]="""","""",SUMIF('mois+1'!C[-14],base!RC[-14],'mois+1'!C[-14])+SUMIF('mois+2'!C[-14],base!RC[-14],'mois+2'!C[-14])+SUMIF('mois+3'!C[-14],base!RC[-14],'mois+3'!C[-14]))"
Range("O2").Select
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=129
Range("M145").Select
ActiveWindow.SmallScroll Down:=-15
Range("O8").Select
Sheets("moisEXI").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A16").Select
ActiveWindow.SmallScroll Down:=-6
Sheets("base").Columns("A:O").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("A1:O2"), CopyToRange:=Range("A10:O10"), Unique:= _
True
ActiveWindow.SmallScroll Down:=-6
Sheets("moisEXI").Select
Range("P10").Select
Selection.Style = "Normal 2"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 15
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.NumberFormat = "#,##0.00"
ActiveCell.FormulaR1C1 = "Nbre de jr retard"
With ActiveCell.Characters(Start:=1, Length:=17).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
' calcul du nombre de jour en retard
Range("P11").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-3]="""","""",TODAY()-RC[-9])"
Range("P12").Select
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Range("P11").Select
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=3
Columns("P").Select
Range("P5").Activate
Application.CutCopyMode = False
Selection.NumberFormat = "#,##0"
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="=30"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
ActiveWindow.SmallScroll Down:=3
Range("O30").Select
ActiveWindow.SmallScroll Down:=-9
' fin
'Ferme le Fichier source
Workbooks("Exigible DQIE1.xls").Close Savechanges:=False
End If
End Sub
Merci d'avance à ce qqui auront la patience de m'aider
Je suis semi-débutant en vba et j'ai réalisé une grosse macro pour le taf mais le probleme c'est que l'ouverture et l'enregistrement du fichier excel est super long.
Je voulais savoir si il existait un moyen de raccourcir cette durée ?
Je pense que c'est a cause de la longueur du code et du nombre de feuille créer (6) mais en fait je n'en sais rien, alors je sollicite tous les experts en vba
Voici le code : (dsl c'est assez lourd mais je vois pas comment faire)
'Récuperation des données
If MsgBox("Avez-vous supprimer la feuille BASE DQIE avant d'executer la macro", vbYesNo) _
= vbYes Then
'ouvrir fichier Source
Workbooks.Open Filename:="Y:\controle financier\Directions de production\Industrie\Gestion DQIE\EXIGIBLE\Exigible DQIE1.xls"
Windows("Exigible DQIE1.xls").Activate
Sheets("Date").Select
Range("C11").Select
ActiveCell.FormulaR1C1 = InputBox("Veuillez entrer la date de fin, de la dernière période de prévision d'encaissement sous forme MM/JJ/AAAA")
Range("C12").Select
Sheets("Base DQIE").Select
Sheets("Base DQIE").Copy Before:=Workbooks("Prev Encaissement.xlsm").Sheets(1)
Sheets("critère").Select
'supréssion des ligne
Rows("10:10").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
'filtre élaboré
Range("A10").Select
Sheets("Base DQIE").Columns("A:M").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("critère!Criteria"), CopyToRange:=Range("A10"), _
Unique:=True
'modif
Sheets("base").Select
Rows("1:1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
'fin
Sheets("critère").Select
Rows("10:10").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("base").Select
Range("A1").Select
ActiveSheet.Paste
'Récupération des données pour mois M+1 M+2 M+3
Sheets("base").Select
Range("N1").Select
Selection.Style = "Normal 2"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 15
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.NumberFormat = "#,##0.00"
ActiveCell.FormulaR1C1 = "Mois"
With ActiveCell.Characters(Start:=1, Length:=4).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Range("N2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-7]="""","""",MONTH(RC[-7]))"
Range("N2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveSheet.Paste
Range("N2").Select
Application.CutCopyMode = False
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=-21
Range("N3").Select
'mois M+1
Sheets("mois+1").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A11").Select
Range("A8").Select
Sheets("base").Columns("A:N").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("'mois+1'!Criteria"), CopyToRange:=Range("A10:N10"), _
Unique:=True
'Mois M+2
Sheets("mois+2").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A14").Select
Sheets("base").Columns("A:N").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("'mois+2'!Criteria"), CopyToRange:=Range( _
"'mois+2'!Extract"), Unique:=True
'Mois M+3
Sheets("mois+3").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A15").Select
Sheets("base").Columns("A:N").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("'mois+3'!Criteria"), CopyToRange:=Range( _
"'mois+3'!Extract"), Unique:=True
'Mois M + Exigible
Sheets("base").Select
Range("O1").Select
Selection.Style = "Normal 2"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 15
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.NumberFormat = "#,##0.00"
ActiveCell.FormulaR1C1 = "Exigible"
With ActiveCell.Characters(Start:=1, Length:=8).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
'Formule dans la base pour l'exigible
Range("O2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]="""","""",SUMIF('mois+1'!C[-14],base!RC[-14],'mois+1'!C[-14])+SUMIF('mois+2'!C[-14],base!RC[-14],'mois+2'!C[-14])+SUMIF('mois+3'!C[-14],base!RC[-14],'mois+3'!C[-14]))"
Range("O2").Select
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=129
Range("M145").Select
ActiveWindow.SmallScroll Down:=-15
Range("O8").Select
Sheets("moisEXI").Select
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A16").Select
ActiveWindow.SmallScroll Down:=-6
Sheets("base").Columns("A:O").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("A1:O2"), CopyToRange:=Range("A10:O10"), Unique:= _
True
ActiveWindow.SmallScroll Down:=-6
Sheets("moisEXI").Select
Range("P10").Select
Selection.Style = "Normal 2"
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ColorIndex = 15
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlHairline
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.NumberFormat = "#,##0.00"
ActiveCell.FormulaR1C1 = "Nbre de jr retard"
With ActiveCell.Characters(Start:=1, Length:=17).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
' calcul du nombre de jour en retard
Range("P11").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-3]="""","""",TODAY()-RC[-9])"
Range("P12").Select
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
Range("P11").Select
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=3
Columns("P").Select
Range("P5").Activate
Application.CutCopyMode = False
Selection.NumberFormat = "#,##0"
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="=30"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
ActiveWindow.SmallScroll Down:=3
Range("O30").Select
ActiveWindow.SmallScroll Down:=-9
' fin
'Ferme le Fichier source
Workbooks("Exigible DQIE1.xls").Close Savechanges:=False
End If
End Sub
Merci d'avance à ce qqui auront la patience de m'aider