Private Sub AffectGEM1()
Application.ScreenUpdating = False
Range(Range("A5"), Range("A7").End(xlDown).Offset(0, 4)).Select
Selection.AutoFilter
Dim c As Range
ActiveSheet.Range("A5").AutoFilter Field:=1, Criteria1:="GE"
For Each c In Application.Intersect(Columns("B"), Sheets("TraitementBalance").AutoFilter.Range.SpecialCells(xlCellTypeVisible))
' Structure
If Mid(c.Value, 1, 4) = "6061" Then
c.Select
Range(ActiveCell.Offset(0, 4), ActiveCell.Offset(0, 7)).Select
ActiveCell.FormulaR1C1 = "Pétrole"
End If
If Mid(c.Value, 1, 4) = "6132" Then
c.Select
Range(ActiveCell.Offset(0, 4), ActiveCell.Offset(0, 7)).Select
ActiveCell.FormulaR1C1 = "Location"
End If
Next
End Sub