Sub NouveauTest()
Application.ScreenUpdating = False
On Error Resume Next 'si pas de SpecialCells
With Sheets("TOUT 300% AFFICHAGE FINAL")
.Range("A4:G" & .Rows.Count).Delete xlUp 'RAZ
Sheets("TOUT 300% AFFICHAGE").[A4].CurrentRegion.Copy .[A4]
With .[A4].CurrentRegion.Resize(, 8)
.Columns(8) = "=1/(G4<>"""")"
Intersect(.SpecialCells(xlCellTypeFormulas, 16).EntireRow, .Cells).Delete xlUp
.Columns(8) = "=1/(G4<>""YYYY"")"
With Intersect(.SpecialCells(xlCellTypeFormulas, 16).EntireRow, .Cells.Columns(7))
.Replace "YYYY", "Hyper-Base" 'modifie la formule
.Font.Name = "Arial" 'modifie le nom de la police
.Columns.AutoFit'ajustement largeur
End With
.Columns(8) = ""
End With
.Rows(.Cells.Find("*", , xlValues, , xlByRows, xlPrevious).Row + 2 & ":" & Rows.Count).Delete
.UsedRange.SpecialCells(xlCellTypeBlanks).Interior.ColorIndex = 15 'gris
.Activate
End With
End Sub